cp's OEIS Frontend

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.

Showing 1-9 of 9 results.

A094202 Integers k whose Zeckendorf representation A014417(k) is palindromic.

Original entry on oeis.org

0, 1, 4, 6, 9, 12, 14, 22, 27, 33, 35, 51, 56, 64, 74, 80, 88, 90, 116, 127, 145, 158, 174, 184, 197, 203, 216, 232, 234, 276, 294, 326, 368, 378, 399, 425, 441, 462, 472, 493, 519, 525, 546, 572, 588, 609, 611, 679, 708, 760, 828, 847, 915, 944, 988, 1022, 1064, 1090
Offset: 1

Views

Author

Ron Knott, May 25 2004

Keywords

Examples

			Fibonacci base columns are ...,8,5,3,2,1 with column entries 0 or 1 and no two consecutive ones (the Zeckendorf representation) so that each n has a unique representation.
12 is in the sequence because 12 = 8 + 3 + 1 = 10101 base Fib; 14 = 13 + 1 = 100001 base Fib.
		

References

  • C. G. Lekkerkerker, Voorstelling van natuurlijke getallen door een som van getallen van Fibonacci, Simon Stevin vol. 29, 1952, pages 190-195.
  • E. Zeckendorf, Représentation des nombres naturels par une somme de nombres de Fibonacci ou de nombres de Lucas, Bulletin de la Société Royale des Sciences de Liège vol. 41 (1972) pages 179-182.

Crossrefs

Gives the positions of zeros in A095734. Subsets: A095730, A048757. A006995 gives the integers whose binary expansion is palindromic.

Programs

  • Mathematica
    zeck[n_Integer] := Block[{k = Ceiling[ Log[ GoldenRatio, n*Sqrt[5]]], t = n, fr = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[ fr, 1]; t = t - Fibonacci[k], AppendTo[fr, 0]]; k-- ]; FromDigits[fr]]; a = {}; Do[z = zeck[n]; If[ FromDigits[ Reverse[ IntegerDigits[z]]] == z, AppendTo[a, n]], {n, 1123}]; a (* Robert G. Wilson v, May 29 2004 *)
    mirror[dig_, s_] := Join[dig, s, Reverse[dig]]; select[v_, mid_] := Select[v, Length[#] == 0 || Last[#] != mid &]; fib[dig_] := Plus @@ (dig * Fibonacci[Range[2, Length[dig] + 1]]); pals = Rest[IntegerDigits /@ FromDigits /@ Select[Tuples[{0, 1}, 7], SequenceCount[#, {1, 1}] == 0 &]]; Union@Join[{0, 1}, fib /@ Join[mirror[#, {}] & /@ (select[pals, 1]), mirror[#, {1}] & /@ (select[pals, 1]), mirror[#, {0}] & /@ pals]] (* Amiram Eldar, Jan 11 2020 *)
  • Python
    from sympy import fibonacci
    def a(n):
        k=0
        x=0
        while n>0:
            k=0
            while fibonacci(k)<=n: k+=1
            x+=10**(k - 3)
            n-=fibonacci(k - 1)
        return x
    def ok(n):
        x=str(a(n))
        return x==x[::-1]
    print([n for n in range(1101) if ok(n)]) # Indranil Ghosh, Jun 07 2017

Extensions

More terms from Robert G. Wilson v, May 28 2004
Offset changed to 1 by Alois P. Heinz, Aug 02 2017

A038183 One-dimensional cellular automaton 'sigma-minus' (Rule 90): 000,001,010,011,100,101,110,111 -> 0,1,0,1,1,0,1,0.

Original entry on oeis.org

1, 5, 17, 85, 257, 1285, 4369, 21845, 65537, 327685, 1114129, 5570645, 16843009, 84215045, 286331153, 1431655765, 4294967297, 21474836485, 73014444049, 365072220245, 1103806595329, 5519032976645, 18764712120593, 93823560602965, 281479271743489, 1407396358717445
Offset: 0

Views

Author

Antti Karttunen, Feb 09 1999

Keywords

Comments

Generation n (starting from the generation 0: 1) interpreted as a binary number.
Observation: for n <= 15, a(n) = smallest number whose Euler totient is divisible by 4^n. This is not true for n = 16. - Arkadiusz Wesolowski, Jul 29 2012
Orbit of 1 under iteration of Rule 90 = A048725 = (n -> n XOR 4n). - M. F. Hasler, Oct 09 2017

Examples

			Successive states are:
          1
         101
        10001
       1010101
      100000001
     10100000101
    1000100010001
   101010101010101
  10000000000000001
  ...
which when converted from binary to decimal give the sequence. - _N. J. A. Sloane_, Jul 21 2014
		

Crossrefs

Cf. A006977, A006978, A038184, A038185 (other cellular automata), A000215 (Fermat numbers).
Also alternate terms of A001317. Cf. A048710, A048720, A048757 (same 0/1-patterns interpreted in Fibonacci number system).
Equals 4*A089893(n)+1.
For right half of triangle (excluding the middle bit) see A245191.
Cf. Sierpiński's gasket, A047999.

Programs

  • Maple
    bit_n := (x,n) -> `mod`(floor(x/(2^n)),2);
    # A recursive, cellular automaton rule version:
    sigmaminus := proc(n) option remember: if (0 = n) then (1)
    else sum('((bit_n(sigmaminus(n-1),i)+bit_n(sigmaminus(n-1),i-2)) mod 2)*(2^i)', 'i'=0..(2*n)) fi: end:
  • Mathematica
    r = 24; c = CellularAutomaton[90, {{1}, 0}, r - 1]; Table[FromDigits[c[[k, r - k + 1 ;; r + k - 1]], 2], {k, r}] (* Arkadiusz Wesolowski, Jun 09 2013 *)
    a[ n_] := Sum[ 4^(n - k) Mod[Binomial[2 n, 2 k], 2], {k, 0, n}]; (* Michael Somos, Jun 30 2018 *)
    a[ n_] := If[ n < 0, 0, Product[ BitGet[n, k] (2^(2^(k + 1))) + 1, {k, 0, n}]]; (* Michael Somos, Jun 30 2018 *)
  • PARI
    vector(100,i,a=if(i>1,bitxor(a<<2,a),1)) \\ M. F. Hasler, Oct 09 2017
    
  • PARI
    {a(n) = sum(k=0, n, binomial(2*n, 2*k)%2 * 4^(n-k))}; /* Michael Somos, Jun 30 2018 */
  • Python
    a=1
    for n in range(55):
        print(a, end=",")
        a ^= a*4
    # Alex Ratushnyak, May 04 2012
    
  • Python
    def A038183(n): return sum((bool(~(m:=n<<1)&m-k)^1)<Chai Wah Wu, May 02 2023
    

Formula

a(n) = Product_{i>=0} bit_n(n, i)*(2^(2^(i+1)))+1: A direct algebraic formula!
a(n) = Sum_{k=0..n} (C(2*n, 2*k) mod 2)*4^(n-k). - Paul Barry, Jan 03 2005
a(2*n+1) = 5*a(2n); a(n+1) = a(n) XOR 4*a(n) where XOR is binary exclusive OR operator. - Philippe Deléham, Jun 18 2005
a(n) = A001317(2n). - Alex Ratushnyak, May 04 2012

A070886 Triangle read by rows giving successive states of cellular automaton generated by "Rule 90".

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0
Offset: 0

Views

Author

N. J. A. Sloane, May 19 2002

Keywords

Comments

If either neighbor is 1 then new state is 1, otherwise new state is 0.
Row n has length 2n+1.
Rules #18, #26, #82, #90, #146, #154, #210, #218 all give rise to this sequence. - Hans Havermann

Examples

			1; 1,0,1; 1,0,0,0,1; 1,0,1,0,1,0,1; ...
		

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 25.

Crossrefs

Cf. A070950, A070887. Alternate rows of A047999. Interpreted as binary numbers: A038183. Interpreted as Zeckendorf-expansions: A048757. Drawn as binary trees: A080263.

Programs

  • Mathematica
    rows = 10; ca = CellularAutomaton[90, {{1}, 0}, rows-1]; Flatten[ Table[ca[[k, rows-k+1 ;; rows+k-1]], {k, 1, rows}]] (* Jean-François Alcover, May 24 2012 *)

Extensions

More terms from Hans Havermann, May 26 2002

A050609 Table T(n,k) = Sum_{i=0..2n} (C(2n,i) mod 2)*F(i+k) = Sum_{i=0..n} (C(n,i) mod 2)*F(2i+k).

Original entry on oeis.org

0, 1, 1, 3, 3, 1, 12, 6, 4, 2, 21, 21, 9, 7, 3, 77, 35, 33, 15, 11, 5, 168, 126, 56, 54, 24, 18, 8, 609, 273, 203, 91, 87, 39, 29, 13, 987, 987, 441, 329, 147, 141, 63, 47, 21, 3572, 1598, 1596, 714, 532, 238, 228, 102, 76, 34, 7755, 5781, 2585, 2583, 1155, 861, 385
Offset: 0

Views

Author

Antti Karttunen, Dec 02 1999

Keywords

Comments

Listed antidiagonalwise as T(0,0), T(1,0), T(0,1), T(2,0), T(1,1), T(0,2), ...

Crossrefs

Transpose of A050610. First row: A051656, second row: A050611, third row: A048757, fourth row: A050612. A050613 gives other Maple procedures. Cf. A025581, A002262.

Programs

  • Maple
    A050609_as_sum := proc(n,k) local i; RETURN(add(((binomial(n,i) mod 2)*fibonacci(k+2*i)),i=0..n)); end;
    A050609_as_product := (n,k) -> (`if`(1 = (n mod 2),luc(n+k),fibonacci(n+k)))*product('luc(2^i)^bit_i(n,i)','i'=1..floor_log_2(n+1)); # Produces same answers.
    [seq(A050609_as_sum(A025581(n), A002262(n)),n=0..119)];

Formula

Also a(n) = A075148(n, k)*A050613(n).

A054433 Numbers formed by interpreting the reduced residue set of every even number as a Zeckendorf Expansion.

Original entry on oeis.org

1, 4, 9, 33, 80, 174, 588, 1596, 3135, 9950, 28512, 56268, 196040, 496496, 888300, 3524577, 9224880, 18118362, 63239220, 150527400, 310190454, 1129200138, 2971168704, 5834056536, 18513646430, 53213956640, 104687896833
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    with(combinat,fibonacci); # one_or_zero given at A054431.
    A054433_as_sum := proc(n) local i; RETURN(add((one_or_zero(igcd(n,i))*fibonacci(i+1)),i=1..(n-1))); end;
  • Mathematica
    r[n_] := Sum[If[GCD[n, k] == 1, Fibonacci[n + 1 - k], 0], {k, 1, n}]; r /@ (2*Range[27]) (* Amiram Eldar, Oct 19 2019 *)

Formula

a(n) = A054433_as_sum(2*n).

A051656 Sum_{i=0..n} (C(n,i) mod 2)*Fibonacci(2*i).

Original entry on oeis.org

0, 1, 3, 12, 21, 77, 168, 609, 987, 3572, 7755, 28059, 47376, 171409, 372099, 1346268, 2178309, 7881197, 17108664, 61899729, 104512485, 378129724, 820851717, 2969869413, 4809706272, 17401680769, 37775923491, 136674575148
Offset: 0

Views

Author

Antti Karttunen, Nov 30 1999

Keywords

Comments

Positions in the first column (A003622) of Wythoff array of the terms which have their Zeckendorf Expansion patterned as row[2n+1] in Pascal's Triangle computed modulo 2 (A047999)

References

  • Proof in preparation, to be published (see A048757).

Crossrefs

Cf. A048757, A047999, A035513, A038183, A051256. First row of A050609, First column of A050610.
a(n) = A019586[A048757[n]]. A048757[n] = SS(Athis_sequence[n])+1, where SSx means the second Fibonacci Successor of x (= x's Z.E. shifted left twice).
Cf. A001906.

Programs

  • Haskell
    a051656 = sum . zipWith (*) a001906_list . a047999_row
    -- Reinhard Zumkeller, Feb 27 2011
    
  • Mathematica
    Table[Sum[Mod[Binomial[n,i],2]Fibonacci[2i],{i,0,n}],{n,0,30}] (* Harvey P. Dale, Oct 30 2011 *)
  • PARI
    a(n)=sum(i=0,n,if(!bitand(i,n-i),fibonacci(2*i))) \\ Charles R Greathouse IV, Jan 04 2013

Formula

a(n) = sum_{i=0..n} (C(2n, 2i) mod 2)*F(2*i) = FL(n)product_{i=0..inf} L(2^i)^bit(n, i) where L is n-th Lucas number (A000032) and FL is defined as in A048757: FL(n) = n-th fibonacci number if n even, n-th Lucas number if n odd.

A051256 Numbers formed from binomial coefficients (mod 2) interpreted as digits in factorial base.

Original entry on oeis.org

1, 3, 7, 33, 121, 843, 5167, 46233, 362881, 3991683, 40279687, 522910113, 6227383801, 93409304523, 1313941673647, 22324392524313, 355687428096001, 6758061133824003, 122000787836928007, 2561305169719296033
Offset: 0

Views

Author

Antti Karttunen, Oct 24 1999

Keywords

Examples

			a(5) = 1! + 2! + 5! + 6! = 843 (only the first, second, fifth and sixth terms are odd in row 5 of Pascal's Triangle).
		

Crossrefs

Programs

  • Maple
    A051256(n) := proc(n) local i; RETURN(add(((binomial(n,i) mod 2)*((i+1)!)),i=0..n)); end;
  • Mathematica
    Table[Sum[(k+1)!Mod[Binomial[n,k],2],{k,0,n}],{n,0,20}] (* Harvey P. Dale, Feb 14 2013 *)
  • Python
    from math import factorial
    def A051256(n):
        return sum(0 if ~n & k else factorial(k+1) for k in range(n+1)) # Chai Wah Wu, Feb 08 2016

Formula

a(n) = Sum_{k=0..n} (k+1)!(C(n, k) mod 2).

A075148 Table E(n,k) (listed antidiagonalwise as E(0,0), E(1,0), E(0,1), E(2,0), E(1,1), E(0,2), ...) where E(n,k) is F(n+k) for all even n and L(n+k) for all odd n. F(n) and L(n) are the n-th Fibonacci (A000045) and Lucas (A000032) numbers respectively.

Original entry on oeis.org

0, 1, 1, 1, 3, 1, 4, 2, 4, 2, 3, 7, 3, 7, 3, 11, 5, 11, 5, 11, 5, 8, 18, 8, 18, 8, 18, 8, 29, 13, 29, 13, 29, 13, 29, 13, 21, 47, 21, 47, 21, 47, 21, 47, 21, 76, 34, 76, 34, 76, 34, 76, 34, 76, 34, 55, 123, 55, 123, 55, 123, 55, 123, 55, 123, 55, 199, 89, 199, 89, 199, 89, 199
Offset: 0

Views

Author

Antti Karttunen, Sep 05 2002

Keywords

Crossrefs

Used to construct A050609 & A048757. Cf. A025581, A002262.

Programs

  • Maple
    with(combinat); [seq(A075148(A025581(n), A002262(n)),n=0..119)]; A075148 := (n,k) -> (fibonacci(n+k-(n mod 2))+fibonacci(n+k+(n mod 2)))/(2-(n mod 2));

Formula

E(n, k) = (fibonacci(n+k-(n mod 2))+fibonacci(n+k+(n mod 2)))/(2-(n mod 2))

A051257 Numbers formed from binomial coefficients (mod 2+k) interpreted as digits in factorial base.

Original entry on oeis.org

1, 3, 11, 43, 231, 1337, 9739, 76209, 706109, 6914977, 78150249, 920172983, 12216376453, 168531536319, 2571960399839, 40581616143967, 701349512411763, 12460393480873445, 240094506439569631, 4749510978132662277
Offset: 0

Views

Author

Antti Karttunen, Oct 24 1999

Keywords

Examples

			a(5) = (1 mod 2)1!+(5 mod 3)2!+(10 mod 4)3!+(10 mod 5)4!+(5 mod 6)5!+(1 mod 7)6! = 1*1+2*2+2*6+0*24+5*120+1*720 = 1337
		

Crossrefs

Programs

  • Maple
    a(n) := proc(n) local i; RETURN(add(((binomial(n,i)mod(i+2))*((i+1)!)),i=0..n)); end;
  • Mathematica
    a[n_] := Sum[(k+1)!*Mod[Binomial[n, k], 2+k], {k, 0, n}]; Table[a[n], {n, 0, 19}] (* Jean-François Alcover, Sep 09 2013 *)

Formula

a(n) = Sum (k+1)!(C(n, k) mod (2+k)), k=0..n
Showing 1-9 of 9 results.