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-4 of 4 results.

A022342 Integers with "even" Zeckendorf expansions (do not end with ...+F_2 = ...+1) (the Fibonacci-even numbers); also, apart from first term, a(n) = Fibonacci successor to n-1.

Original entry on oeis.org

0, 2, 3, 5, 7, 8, 10, 11, 13, 15, 16, 18, 20, 21, 23, 24, 26, 28, 29, 31, 32, 34, 36, 37, 39, 41, 42, 44, 45, 47, 49, 50, 52, 54, 55, 57, 58, 60, 62, 63, 65, 66, 68, 70, 71, 73, 75, 76, 78, 79, 81, 83, 84, 86, 87, 89, 91, 92, 94, 96, 97, 99, 100, 102, 104, 105, 107
Offset: 1

Views

Author

Keywords

Comments

The Zeckendorf expansion of n is obtained by repeatedly subtracting the largest Fibonacci number you can until nothing remains; for example, 100 = 89 + 8 + 3.
The Fibonacci successor to n is found by replacing each F_i in the Zeckendorf expansion by F_{i+1}; for example, the successor to 100 is 144 + 13 + 5 = 162.
If k appears, k + (rank of k) does not (10 is the 7th term in the sequence but 10 + 7 = 17 is not a term of the sequence). - Benoit Cloitre, Jun 18 2002
From Michele Dondi (bik.mido(AT)tiscalenet.it), Dec 30 2001: (Start)
a(n) = Sum_{k in A_n} F_{k+1}, where a(n)= Sum_{k in A_n} F_k is the (unique) expression of n as a sum of "noncontiguous" Fibonacci numbers (with index >= 2).
a(10^n) gives the first few digits of g = (sqrt(5)+1)/2.
The sequences given by b(n+1) = a(b(n)) obey the general recursion law of Fibonacci numbers. In particular the (sub)sequence (of a(-)) yielded by a starting value of 2=a(1), is the sequence of Fibonacci numbers >= 2. Starting points of all such subsequences are given by A035336.
a(n) = floor(phi*n+1/phi); phi = (sqrt(5)+1)/2. a(F_n)=F_{n+1} if F_n is the n-th Fibonacci number.
(End)
From Amiram Eldar, Sep 03 2022: (Start)
Numbers with an even number of trailing 1's in their dual Zeckendorf representation (A104326), i.e., numbers k such that A356749(k) is even.
The asymptotic density of this sequence is 1/phi (A094214). (End)

Examples

			The successors to 1, 2, 3, 4=3+1 are 2, 3, 5, 7=5+2.
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 307-308 of 2nd edition.
  • E. Zeckendorf, Représentation des nombres naturels par une somme des nombres de Fibonacci ou de nombres de Lucas, Bull. Soc. Roy. Sci. Liège 41, 179-182, 1972.

Crossrefs

Positions of 0's in A003849.
Complement of A003622.
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A000201 as the parent: A000201, A001030, A001468, A001950, A003622, A003842, A003849, A004641, A005614, A014675, A022342, A088462, A096270, A114986, A124841. - N. J. A. Sloane, Mar 11 2021

Programs

  • Haskell
    a022342 n = a022342_list !! (n-1)
    a022342_list = filter ((notElem 1) . a035516_row) [0..]
    -- Reinhard Zumkeller, Mar 10 2013
    
  • Magma
    [Floor(n*(Sqrt(5)+1)/2)-1: n in [1..100]]; // Vincenzo Librandi, Feb 16 2015
    
  • Maple
    A022342 := proc(n)
          local g;
          g := (1+sqrt(5))/2 ;
        floor(n*g)-1 ;
    end proc: # R. J. Mathar, Aug 04 2013
  • Mathematica
    With[{t=GoldenRatio^2},Table[Floor[n*t]-n-1,{n,70}]] (* Harvey P. Dale, Aug 08 2012 *)
  • PARI
    a(n)=floor(n*(sqrt(5)+1)/2)-1
    
  • PARI
    a(n)=(sqrtint(5*n^2)+n-2)\2 \\ Charles R Greathouse IV, Feb 27 2014
    
  • Python
    from math import isqrt
    def A022342(n): return (n+isqrt(5*n**2)>>1)-1 # Chai Wah Wu, Aug 17 2022

Formula

a(n) = floor(n*phi^2) - n - 1 = floor(n*phi) - 1 = A000201(n) - 1, where phi is the golden ratio.
a(n) = A003622(n) - n. - Philippe Deléham, May 03 2004
a(n+1) = A022290(2*A003714(n)). - R. J. Mathar, Jan 31 2015
For n > 1: A035612(a(n)) > 1. - Reinhard Zumkeller, Feb 03 2015
a(n) = A000201(n) - 1. First differences are given in A014675 (or A001468, ignoring its first term). - M. F. Hasler, Oct 13 2017
a(n) = a(n-1) + 1 + A005614(n-2) for n > 1; also a(n) = a(n-1) + A014675(n-2) = a(n-1) + A001468(n-1). - A.H.M. Smeets, Apr 26 2024

Extensions

Name edited by Peter Munn, Dec 07 2021

A062880 Zero together with the numbers which can be written as a sum of distinct odd powers of 2.

Original entry on oeis.org

0, 2, 8, 10, 32, 34, 40, 42, 128, 130, 136, 138, 160, 162, 168, 170, 512, 514, 520, 522, 544, 546, 552, 554, 640, 642, 648, 650, 672, 674, 680, 682, 2048, 2050, 2056, 2058, 2080, 2082, 2088, 2090, 2176, 2178, 2184, 2186, 2208, 2210, 2216, 2218, 2560, 2562
Offset: 0

Views

Author

Antti Karttunen, Jun 26 2001

Keywords

Comments

Binary expansion of n does not contain 1-bits at even positions.
Integers whose base-4 representation consists of only 0's and 2's.
Every nonnegative even number is a unique sum of the form a(k)+2*a(l); moreover, this sequence is unique with such property. - Vladimir Shevelev, Nov 07 2008
Also numbers such that the digital sum base 2 and the digital sum base 4 are in a ratio of 2:4. - Michel Marcus, Sep 23 2013
From Gus Wiseman, Jun 10 2020: (Start)
Numbers k such that the k-th composition in standard order has all even parts. The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. For example, the sequence of all compositions into even parts begins:
0: () 520: (6,4) 2080: (6,6)
2: (2) 522: (6,2,2) 2082: (6,4,2)
8: (4) 544: (4,6) 2088: (6,2,4)
10: (2,2) 546: (4,4,2) 2090: (6,2,2,2)
32: (6) 552: (4,2,4) 2176: (4,8)
34: (4,2) 554: (4,2,2,2) 2178: (4,6,2)
40: (2,4) 640: (2,8) 2184: (4,4,4)
42: (2,2,2) 642: (2,6,2) 2186: (4,4,2,2)
128: (8) 648: (2,4,4) 2208: (4,2,6)
130: (6,2) 650: (2,4,2,2) 2210: (4,2,4,2)
136: (4,4) 672: (2,2,6) 2216: (4,2,2,4)
138: (4,2,2) 674: (2,2,4,2) 2218: (4,2,2,2,2)
160: (2,6) 680: (2,2,2,4) 2560: (2,10)
162: (2,4,2) 682: (2,2,2,2,2) 2562: (2,8,2)
168: (2,2,4) 2048: (12) 2568: (2,6,4)
170: (2,2,2,2) 2050: (10,2) 2570: (2,6,2,2)
512: (10) 2056: (8,4) 2592: (2,4,6)
514: (8,2) 2058: (8,2,2) 2594: (2,4,4,2)
(End)

Crossrefs

Cf. A000695.
Except for first term, n such that A063694(n) = 0. Binary expansion is given in A062033.
Interpreted as Zeckendorf expansion: A062879.
Central diagonal of arrays A163357 and A163359.
Even partitions are counted by A035363.
Numbers with an even number of 1's in binary expansion are A001969.
Numbers whose binary expansion has even length are A053754.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Compositions without even parts are A060142.
- Sum is A070939.
- Product is A124758.
- Strict compositions are A233564.
- Heinz number is A333219.
- Number of distinct parts is A334028.

Programs

  • C
    uint32_t a_next(uint32_t a_n) { return (a_n + 0x55555556) & 0xaaaaaaaa; } /* Falk Hüffner, Jan 22 2022 */
    
  • Haskell
    a062880 n = a062880_list !! n
    a062880_list = filter f [0..] where
       f 0 = True
       f x = (m == 0 || m == 2) && f x'  where (x', m) = divMod x 4
    -- Reinhard Zumkeller, Nov 20 2012
    
  • Maple
    [seq(a(j),j=0..100)]; a := n -> add((floor(n/(2^i)) mod 2)*(2^((2*i)+1)),i=0..floor_log_2(n+1));
  • Mathematica
    b[n_] := BitAnd[n, Sum[2^k, {k, 0, Log[2, n] // Floor, 2}]]; Select[Range[ 0, 10^4], b[#] == 0&] (* Jean-François Alcover, Feb 28 2016 *)
  • Python
    def A062880(n): return int(bin(n)[2:],4)<<1 # Chai Wah Wu, Aug 21 2023

Formula

a(n) = 2 * A000695(n). - Vladimir Shevelev, Nov 07 2008
From Robert Israel, Apr 10 2018: (Start)
a(2*n) = 4*a(n).
a(2*n+1) = 4*a(n)+2.
G.f. g(x) satisfies: g(x) = 4*(1+x)*g(x^2)+2*x/(1-x^2). (End)

A062877 0 and numbers representable as a sum of distinct odd-indexed Fibonacci numbers.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 8, 13, 14, 15, 16, 18, 19, 20, 21, 34, 35, 36, 37, 39, 40, 41, 42, 47, 48, 49, 50, 52, 53, 54, 55, 89, 90, 91, 92, 94, 95, 96, 97, 102, 103, 104, 105, 107, 108, 109, 110, 123, 124, 125, 126, 128, 129, 130, 131, 136, 137, 138, 139, 141, 142, 143, 144
Offset: 0

Views

Author

Antti Karttunen, Jun 26 2001

Keywords

Examples

			F_1 = 1,
F_3 = 2,
F_1 + F_3 = 3,
F_5 = 5,
F_5 + F_1 = 6,
F_5 + F_3 = 7,
F_5 + F_3 + F_1 = 8,
F_7 = 13, ...
		

Crossrefs

A062878 gives the positions of A050614(n) in this sequence. A062879 is bisection.
A036796(n) - 1.
Cf. A022290 (even-indexed Fibonaccis), A054204.

Programs

  • Maple
    with(combinat); [seq(A062877(j),j=0..265)]; A062877 := n -> add((floor(n/(2^i)) mod 2)*fibonacci((2*i)+1),i=0..floor_log_2(n+1));
    floor_log_2 := proc(n) local nn,i; nn := n; for i from -1 to n do if(0 = nn) then RETURN(i); fi; nn := floor(nn/2); od; end;
    # alternative
    isA062877 := proc(n)
        local fset,fidx,ps ;
        if n = 0 then
            return true;
        end if;
        fset := {} ;
        for fidx from 1 by 2 do
            if combinat[fibonacci](fidx) >n then
                break;
            end if;
            fset := fset union {combinat[fibonacci](fidx)} ;
        end do:
        for ps in combinat[powerset](fset) do
            if n = add(fidx,fidx=ps) then
                return true;
            end if;
        end do:
        return false;
    end proc: # R. J. Mathar, Aug 22 2016
  • Mathematica
    Take[Union[Total/@Subsets[Fibonacci[Range[1,20,2]]]],70](* Harvey P. Dale, Dec 21 2013 *)
  • PARI
    my(m=Mod('x,'x^2-3*'x+1)); a(n) = subst(lift(subst(Pol(binary(n)), 'x,m)), 'x,2); \\ Kevin Ryde, Nov 25 2020

A165278 Table read by antidiagonals: T(n, k) is the k-th number with n-1 even-indexed Fibonacci numbers in its Zeckendorf representation.

Original entry on oeis.org

2, 5, 1, 7, 3, 4, 13, 6, 9, 12, 15, 8, 11, 25, 33, 18, 10, 17, 30, 67, 88, 20, 14, 22, 32, 80, 177, 232, 34, 16, 24, 46, 85, 211, 465, 609, 36, 19, 27, 59, 87, 224, 554, 1219, 1596, 39, 21, 29, 64, 122, 229, 588, 1452, 3193, 4180, 41, 23, 31, 66, 156, 231, 601
Offset: 1

Views

Author

Clark Kimberling, Sep 13 2009

Keywords

Comments

For n>=0, row n is the monotonic sequence of positive integers m such that the number of even-indexed Fibonacci numbers in the Zeckendorf representation of m is n.
We begin the indexing at 2; that is, 1=F(2), 2=F(3), 3=F(4), 5=F(5),...
Every positive integer occurs exactly once in the array, so that as a sequence it is a permutation of the positive integers.
For counts of odd-indexed Fibonacci numbers, see A165279.
Essentially, (row 0)=A062879, (column 1)=A027941, (column 2)=A069403.

Examples

			Northwest corner:
2....5....7...13...15...18...20...34...36...
1....3....6....8...10...14...16...19...20...
4....9...11...17...22...24...27...29...31...
12..25...30...32...46...59...64...66...72...
Examples:
20=13+5+2=F(7)+F(5)+F(3), zero evens, so 20 is in row 0.
19=13+5+1=F(7)+F(5)+F(2), one even, so 19 is in row 1.
22=21+1=F(8)+F(2), two evens, so 22 is in row 2.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Module[{i = Ceiling[Log[GoldenRatio, Sqrt[5]*n]], v = {}, m = n}, While[i > 1, If[Fibonacci[i] <= m, AppendTo[v, 1]; m -= Fibonacci[i], If[v != {}, AppendTo[v, 0]]]; i--]; Total[Reverse[v][[1 ;; -1 ;; 2]]]]; T = GatherBy[SortBy[ Range[10^4], f], f]; Table[Table[T[[n - k + 1, k]], {k, n, 1, -1}], {n, 1, Length[T]}] // Flatten (* Amiram Eldar, Feb 04 2020 *)

Extensions

More terms from Amiram Eldar, Feb 04 2020
Showing 1-4 of 4 results.