13 votes

Infinite Candle Sequence

Python, 31 bytes f=lambda a:a and(f(a//2)+a%2)/2 Attempt This Online! Returns the nth term (0-based) as a float. Python, 54 bytes a=b=0 while[print(int(bin(a)[:1:-1],2)/-~b)]:a+=1;b|=a Attempt This ...
user avatar
  • 5,690
11 votes

Palindromic Powers

Desmos, 177 175 bytes ...
user avatar
  • 3,802
8 votes

Palindromic Powers

05AB1E, 11 bytes <TŸʒÓ¿≠yÂQ& Try it online! Before Kevin wakes up and outgolfs me. Port of Jelly. How? ...
user avatar
  • 3,566
7 votes

The Binary Eyes

Python 3, 45 bytes n=1 while[print(f'{0:1^{n}},{1:0^{n}}')]:n+=2 Try it online!
user avatar
  • 16.9k
7 votes

Irradiated Polyglots

Perl 5 -M5.010 + A Pear Tree, score 0, tiebreak score 96 bytes ...
6 votes

The Binary Eyes

Python, 48 bytes s,t="01" while[print(s,t)]:s,t=f"1{s}1",f"0{t}0" Attempt This Online! -5 thanks to @loopy walt JavaScript (V8), 42 bytes ...
user avatar
  • 18.3k
6 votes

The Binary Eyes

Haskell, 31 bytes g[0] g x=x:map(0^)x:g(1:x++[1]) Try it online! Infinite sequence
user avatar
  • 9,426
6 votes

Infinite Candle Sequence

JavaScript (ES6), 32 bytes Returns the \$n\$-th term, 0-indexed. f=(n,p=0)=>n?f(n>>1,2*p|n&1)/2:p Try it online! 23 bytes Using loopy walt's approach,...
user avatar
  • 166k
6 votes

Palindromic Powers

Jelly, 13 bytes ’⁵rŒḂƇÆEg/’ƊƇ Try it online! -1 byte thanks to Jonathan Allan! In order for some \$k = p_1^{e_1}p_2^{e_2}\cdots p_i^{e_i}\$ to be a perfect power (...
user avatar
5 votes

Sequence of integers not the sum of powers of earlier terms

Python 3, 121 107 105 102 101 bytes -3 inspired by Neil's comments, and another -1 thanks to Neil! Prints the sequence indefinitely. Runs out of memory before finding 25 on TIO. ...
user avatar
  • 53.4k
5 votes

Infinite Candle Sequence

Charcoal, 8 bytes I↨·⁵↨⊗N² Try it online! Link is to verbose version of code. Outputs the 0-indexed nth term. Explanation: ...
user avatar
  • 142k
5 votes

Infinite Candle Sequence

C (gcc), 63 60 bytes float d,v;float f(n){for(d=1,v=0;n;n/=2,d*=2)v+=v+n%2;v/=d;} Try it online! Saved 3 bytes thanks to Dominic van Essen!!! Inputs integer \$n\$....
user avatar
  • 17.8k
5 votes

Infinite Candle Sequence

Husk, 4 bytes ½B.ḋ (or, equivalently, B.ḋD) Try it online! Outputs n-th term of sequence. Same approach as Neil's variant of ...
user avatar
5 votes

Infinite Candle Sequence

Jelly, 4 bytes BHḅ. A monadic Link that accepts a non-negative integer and yields the element of the binary Van der Corput sequence at that 0-indexed index. Try it ...
user avatar
5 votes

Find the nth Fibonacci number, where n is the mth Fibonacci number

Jelly, 4 bytes ÆḞ2¡ Attempt This Online! How? ÆḞ2¡ 2¡ # Execute twice: ÆḞ # Nth fibonacci number 05AB1E, 4 bytes ...
user avatar
  • 3,566
4 votes

Infinite Candle Sequence

Factor, 54 42 bytes [ >bin 48 v-n 0 [ [ 2 / ] bi@ + ] reduce ] Try it online! ...
user avatar
  • 8,568
4 votes

Palindromic Powers

Wolfram Language (Mathematica), 60 bytes Select[h=Range[#-1],(h[[a#]]=a=h[[#]])<#>9&&PalindromeQ@#&]& Try it online! ...
user avatar
  • 15k
4 votes

Palindromic Powers

Factor + math.primes.factors project-euler.common, 101 102 bytes ...
user avatar
  • 8,568
3 votes

The Binary Eyes

x86-64 machine code, 32 bytes 31 D2 B8 31 34 01 AA 34 01 89 D1 F3 AA F6 DC 78 F3 C6 07 0A AE 7B F0 FF C2 39 F2 75 EA 88 0F C3 Try it online! Following the standard ...
user avatar
  • 5,326
3 votes

The Binary Eyes

Vyxal M, 6 bytes ƛÞǔ∞₍† Try it Online! ...
user avatar
  • 3,566
3 votes

The Binary Eyes

Jelly, 6 bytes ṬŒḄ¬Ƭ) Try it online! Add another byte if the pairs can't be backwards.
user avatar
3 votes

The Binary Eyes

Factor + combinators.extras, 69 bytes ...
user avatar
  • 8,568
3 votes

Sequence of integers not the sum of powers of earlier terms

Jelly, 24 22 bytes *þṀŻ$ZŒpŒP€Ẏ§‘ḟ$Ṃ; ⁸Ç¡ Try it online! Takes \$n\$ via STDIN and outputs the first \$n\$ terms in reverse order. +1 byte if the output has to be ...
user avatar
3 votes

Sequence of integers not the sum of powers of earlier terms

Jelly, 22 bytes -rṀṗL‘a*@ɗ⁸§‘ḟ$Ṃ;@ ⁸Ç¡ A full program that accepts an integer, n, from STDIN and prints the Jelly ...
user avatar
3 votes

Infinite Candle Sequence

Retina 0.8.2, 64 bytes \d+ $* +`(1+)\1 $+0 01 1 .+ $&/$.&$*01 1 10 +`01 110 0 1+|^ $.& Try it online! Link is to test suite that generates the results ...
user avatar
  • 142k
3 votes

Infinite Candle Sequence

PARI/GP, 23 bytes f(a)=if(a,f(a\2)+a%2)/2 Attempt This Online! A port of loopy walt's Python answer.
user avatar
  • 32.7k
3 votes

Infinite Candle Sequence

Wolfram Language (Mathematica), 38 33 bytes If[#<1,0,#0@⌊#/2⌋+#~Mod~2]/2& Try it online! -5 bytes thanks to att
user avatar
  • 3,566
3 votes

Palindromic Powers

Vyxal, 14 bytes ‹₀ṡ'ǐĠvLġċnḂ=∧ Try it Online! Port of Jelly answer. How? ...
user avatar
  • 3,566
3 votes

Palindromic Powers

C (gcc), 117 bytes Brute force at its finest. It might be improvable by merging the two for loops into one, but I currently have no idea how to go about that. <...
user avatar
  • 16.9k
3 votes

Palindromic Powers

Haskell, 76 72 64 bytes f n=[z|x<-[2..n],z<-map(x^)[2..n],z<n,(==)=<<reverse$show z,z>9] Attempt This Online! Given the ranges ...
user avatar
  • 25k

Only top scored, non community-wiki answers of a minimum length are eligible