A055591 a(n) = a(n-1)+3^a(n-1).
0, 1, 4, 85, 35917545547686059365808220080151141317128
Offset: 0
Examples
a(3) = 4+3^4 = 4+81 = 85
Programs
-
Mathematica
NestList[#+3^#&,0,4] (* Harvey P. Dale, Apr 18 2012 *)
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
a(3) = 4+3^4 = 4+81 = 85
NestList[#+3^#&,0,4] (* Harvey P. Dale, Apr 18 2012 *)
23 is in the sequence because 23 = 2^4 + 2^2 + 2^1 + 2^0 encodes the transitive set {0,1,{1},{{1}}} (remember that 0 is the empty set and 1 is {0}).
b[n_] := (Flatten @ Position[Reverse[IntegerDigits[n, 2]], 1] - 1); okQ[n_] := With[{bb = b[n]}, AllTrue[b /@ bb, Intersection[bb, #] == #&]]; Select[Range[0, 600], okQ] (* Jean-François Alcover, Jul 25 2019 *)
is(n) = { for (b=0, #binary(n), if (bittest(n, b), if (bitand(n, b)!=b, return (0)))); return (1) } \\ Rémy Sigrist, Jul 25 2019
a(4) = 2^(0+1+2+8) = 2^11 = 2048; a(5) = 2^2059>10^619
The initial terms together with their binary indices: 2: {2} 257: {1,9} 8519971: {1,2,6,9,18,24} 36574494881: {1,6,8,16,18,27,32,36} 140739702949921: {1,6,12,27,32,48} 140773995710729: {1,4,9,12,18,32,36,48} 140774004099109: {1,3,6,12,18,24,32,36,48}
bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1]; Select[Prime[Range[1000]],IntegerQ[Mean[bpe[#]]]&&IntegerQ[GeometricMean[bpe[#]]]&]
a(5) = 71, 71 in base 2 (reverse order of digits) = 1110001. ||| | 123 7
a[n_] := a[n] = If[n <= 3, n, 2^(a[n - 1] - 1) + a[n - 1]]; Table[a[n], {n, 1, 6}]
Comments