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.

Previous Showing 31-40 of 47 results. Next

A062879 Integers whose Zeckendorf expansion does not contain ones at even positions.

Original entry on oeis.org

0, 2, 5, 7, 13, 15, 18, 20, 34, 36, 39, 41, 47, 49, 52, 54, 89, 91, 94, 96, 102, 104, 107, 109, 123, 125, 128, 130, 136, 138, 141, 143, 233, 235, 238, 240, 246, 248, 251, 253, 267, 269, 272, 274, 280, 282, 285, 287, 322, 324, 327, 329, 335, 337, 340, 342, 356
Offset: 1

Views

Author

Antti Karttunen, Jun 26 2001

Keywords

Crossrefs

Bisection of A062877.
Subset of A022342.

Programs

  • Mathematica
    fibOddCount[n_] := Plus @@ (Reverse@IntegerDigits[n, 2])[[1 ;; -1 ;; 2]]; oddIndexed = fibOddCount /@ Select[Range[0, 10000], BitAnd[#, 2 #] == 0 &]; -1 + Position[oddIndexed, ?(# == 0 &)] // Flatten (* _Amiram Eldar, Jan 20 2020  *)

Formula

A062880(n) = A003714(a(n)).
A165276(a(n)) = 0. - Amiram Eldar, Jan 20 2020

Extensions

Offset corrected by Amiram Eldar, Jan 20 2020

A095080 Fibeven primes, i.e., primes p whose Zeckendorf-expansion A014417(p) ends with zero.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 23, 29, 31, 37, 41, 47, 71, 73, 79, 83, 89, 97, 107, 109, 113, 131, 139, 149, 151, 157, 167, 173, 181, 191, 193, 199, 223, 227, 233, 241, 251, 257, 269, 277, 283, 293, 311, 317, 337, 353, 359, 367, 379, 397, 401, 409, 419, 421
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Crossrefs

Intersection of A000040 and A022342. Union of A095082 and A095087. Cf. A095060, A095081.

Programs

  • Maple
    F:= combinat[fibonacci]:
    b:= proc(n) option remember; local j;
          if n=0 then 0
        else for j from 2 while F(j+1)<=n do od;
             b(n-F(j))+2^(j-2)
          fi
        end:
    a:= proc(n) option remember; local p;
          p:= `if`(n=1, 1, a(n-1));
          do p:= nextprime(p);
             if b(p)::even then break fi
          od; p
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Mar 27 2016
  • Mathematica
    F = Fibonacci;
    b[n_] := b[n] = Module[{j},
         If[n == 0, 0, For[j = 2, F[j + 1] <= n, j++];
         b[n - F[j]] + 2^(j - 2)]];
    a[n_] := a[n] = Module[{p},
         p = If[n == 1, 1, a[n - 1]]; While[True,
         p = NextPrime[p]; If[ EvenQ[b[p]], Break[]]]; p];
    Array[a, 100] (* Jean-François Alcover, Jul 01 2021, after Alois P. Heinz *)
  • Python
    from sympy import fibonacci, primerange
    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):
        return str(a(n))[-1]=="0"
    print([n for n in primerange(1, 1001) if ok(n)]) # Indranil Ghosh, Jun 07 2017

A101646 Array read by antidiagonals: T(n,k) = variant of Knuth's Fibonacci (or circle) product of n and k (A101330). Sometimes called the "arroba" product.

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 4, 5, 5, 4, 5, 7, 8, 7, 5, 6, 8, 11, 11, 8, 6, 7, 10, 13, 15, 13, 10, 7, 8, 11, 16, 18, 18, 16, 11, 8, 9, 13, 18, 22, 21, 22, 18, 13, 9, 10, 15, 21, 25, 26, 26, 25, 21, 15, 10, 11, 16, 24, 29, 29, 32, 29, 29, 24, 16, 11, 12, 18, 26, 33, 34, 36, 36, 34, 33, 26, 18, 12
Offset: 1

Views

Author

David Applegate and N. J. A. Sloane, Jan 26 2005

Keywords

Comments

Let n = Sum_{i >= 2} eps(i) Fib_i and k = Sum_{j >= 2} eps(j) Fib_j be the Zeckendorf expansions of n and k, respectively (cf. A035517, A014417). The product of n and k is defined here to be n x k = Sum_{i,j} eps(i)*eps(j) Fib_{i+j-2} (= T(n,k)). [Comment corrected by R. J. Mathar, Aug 07 2007]
Although now 1 is the multiplicative identity, in contrast to A101330, this multiplication is not associative. For example, as pointed out by Grabner et al., we have (4 x 7 ) x 9 = 25 x 9 = 198 but 4 x (7 x 9 ) = 4 x 54 = 195.

Examples

			Array begins:
  1 2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 ...
  2 3  5  7  8 10 11 13 15 16 18 20 21 23 24 26 28 29 31 ...
  3 5  8 11 13 16 18 21 24 26 29 32 34 37 39 42 45 47 50 ...
  4 7 11 15 18 22 25 29 33 36 40 44 47 51 54 58 62 65 69 ...
  5 8 13 18 21 26 29 34 39 42 47 52 55 60 63 68 73 76 81 ...
...
		

Crossrefs

Cf. A101330, A101385, A035517, A014417. Main diagonal is A101711.
First 4 rows give A000027, A022342, A026274, A101741.

Programs

  • Mathematica
    T[n_, k_] := With[{phi2 = GoldenRatio^2}, n k - Floor[(k + 1)/phi2] Floor[ (n + 1)/phi2]];
    Table[T[n - k + 1, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Mar 31 2020 *)
  • PARI
    T(n, k) = my(phi2 = ((1+sqrt(5))/2)^2); n*k - floor((k+1)/phi2)*floor((n+1)/phi2); \\ Michel Marcus, Mar 29 2016

Formula

T(n, k) = n*k - [(k+1)/phi^2] [(n+1)/phi^2]. For proof see link. - Fred Lunnon, May 24 2008

A227351 Permutation of nonnegative integers: map each number by lengths of runs of zeros in its Zeckendorf expansion shifted once left to the number which has the same lengths of runs (in the same order, but alternatively of runs of 0's and 1's) in its binary representation.

Original entry on oeis.org

0, 1, 3, 7, 2, 15, 6, 4, 31, 14, 12, 8, 5, 63, 30, 28, 24, 13, 16, 9, 11, 127, 62, 60, 56, 29, 48, 25, 27, 32, 17, 19, 23, 10, 255, 126, 124, 120, 61, 112, 57, 59, 96, 49, 51, 55, 26, 64, 33, 35, 39, 18, 47, 22, 20, 511, 254, 252, 248, 125, 240, 121, 123, 224
Offset: 0

Views

Author

Antti Karttunen, Jul 08 2013

Keywords

Comments

This permutation is based on the fact that by appending one extra zero to the right of Fibonacci number representation of n (aka "Zeckendorf expansion") and then counting the lengths of blocks of consecutive (nonleading) zeros we get bijective correspondence with compositions, and thus also with the binary representation of a unique n. See the chart below:
n A014417(n) A014417(A022342(n+1)) Runs of Binary number In dec.
[shifted once left] zeros with same runs = a(n)
0: ......0 ......0 [] .....0 0
1: ......1 .....10 [1] .....1 1
2: .....10 ....100 [2] ....11 3
3: ....100 ...1000 [3] ...111 7
4: ....101 ...1010 [1,1] ....10 2
5: ...1000 ..10000 [4] ..1111 15
6: ...1001 ..10010 [2,1] ...110 6
7: ...1010 ..10100 [1,2] ...100 4
8: ..10000 .100000 [5] .11111 31
9: ..10001 .100010 [3,1] ..1110 14
10: ..10010 .100100 [2,2] ..1100 12
11: ..10100 .101000 [1,3] ..1000 8
12: ..10101 .101010 [1,1,1] ...101 5
13: .100000 1000000 [6] 111111 63
Are there any other fixed points after 0, 1, 6, 803, 407483 ?

Crossrefs

Inverse permutation: A227352. Cf. also A003714, A014417, A006068, A048679.
Could be further composed with A075157 or A075159, also A129594.

Programs

Formula

a(n) = A006068(A048679(n)) = A006068(A106151(2*A003714(n))).
This permutation effects following correspondences:
a(A000045(n)) = A000225(n-1).
a(A027941(n)) = A000975(n).
For n >=3, a(A000204(n)) = A000079(n-2).

A269729 a(n) = row number of extended Wythoff array (see A035513) which contains the sequence obtained by reading the n-th row backwards (and adjusting signs).

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 10, 5, 8, 11, 6, 9, 12, 20, 28, 15, 23, 31, 18, 26, 13, 21, 29, 16, 24, 32, 19, 27, 14, 22, 30, 17, 25, 33, 54, 75, 41, 62, 83, 49, 70, 36, 57, 78, 44, 65, 86, 52, 73, 39, 60, 81, 47, 68, 34, 55, 76, 42, 63, 84, 50, 71, 37, 58, 79, 45, 66, 87, 53, 74, 40
Offset: 0

Views

Author

N. J. A. Sloane, Mar 08 2016

Keywords

Comments

Conjecture: sequence is its own inverse. - R. J. Mathar, May 08 2019

Examples

			Take n=5: reading row 5 of A035513 backwards gives ... 23, 14, 9, 5, 4, 1, 3, -2, 5, -7, 12, -19, ..., which after adjusting the signs is row 7, so a(5) = 7.
		

References

  • J. H. Conway, Postings to Math Fun Mailing List, Nov 25 1996 and Dec 02 1996.

Crossrefs

See A269733 for first differences.

Programs

  • Maple
    A035513 := proc(r::integer, c::integer)
        option remember;
        if c = 1 then
            A003622(r) ;
        elif c > 1 then
            A022342(1+procname(r, c-1)) ;
        elif c < 1 then
            procname(r,c+2)-procname(r,c+1) ;
        end if;
    end proc:
    # search in A035513 for row with consecutive w1,w2
    A035513inv := proc(w1::integer,w2::integer)
        local r,c,W1,W2 ;
        for r from 1 do
            if A035513(r,1) > w2 then
                return -1 ;
            end if;
            for c from 1 do
                W1 := A035513(r,c) ;
                W2 := A035513(r,c+1) ;
                if W1=w1 and W2=w2 then
                    return r-1 ;
                elif W2 > w2 then
                    break;
                end if;
            end do:
        end do:
    end proc:
    A269729 := proc(n)
        option remember;
        local c,W1,W2,r,n35513;
        n35513 := n+1 ;
        for c from 1 by -1 do
            W1 := A035513(n35513,c) ;
            W2 := A035513(n35513,c-1) ;
            if W1 < 0 and abs(W2) > abs(W1) then
                r :=  A035513inv(abs(W1),abs(W2)) ;
                if r >= 0 then
                    return r;
                end if;
            end if;
        end do:
    end proc:
    seq(A269729(n),n=0..120) ; # R. J. Mathar, May 08 2019
  • Mathematica
    W[n_, k_] := W[n, k] = Fibonacci[k+1] Floor[n*GoldenRatio] + (n-1)* Fibonacci[k];
    Winv[w1_, w2_] := Winv[w1, w2] = Module[{r, c, W1, W2}, For[r = 1, True, r++, If[W[r, 1] > w2, Return[-1]]; For[c = 1, True, c++, W1 = W[r, c]; W2 = W[r, c+1]; If[W1 == w1 && W2 == w2, Return[r-1], If[W2 > w2, Break[]]]]]];
    a[n_] := a[n] = Module[{c, W1, W2, r, nw}, nw = n+1; For[c = 1, True, c--, W1 = W[nw, c]; W2 = W[nw, c-1]; If[W1 < 0 && Abs[W2] > Abs[W1], r = Winv[Abs[W1], Abs[W2]]; If[r >= 0, Return[r]]]]];
    Table[Print[n, " ", a[n]]; a[n], {n, 0, 120}] (* Jean-François Alcover, Aug 09 2023, after R. J. Mathar *)

Extensions

Terms from a(18) on by R. J. Mathar, May 08 2019

A335999 a(1) = 1; for n >= 2, a(n) = least positive integer not in {a(1),..., a(n-1), b(1),...,b(n-1)}, where for n >=1, b(n) = n + 2 + least positive integer not in {a(1),..., a(n-1), a(n), b(1),...,b(n-1)}.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 10, 11, 13, 14, 16, 17, 19, 21, 22, 24, 26, 27, 29, 31, 32, 34, 35, 37, 39, 40, 42, 43, 45, 47, 48, 50, 51, 53, 55, 56, 58, 60, 61, 63, 64, 66, 68, 69, 71, 73, 74, 76, 77, 79, 81, 82, 84, 86, 87, 89, 90, 92, 94, 95, 97, 98, 100, 102, 103
Offset: 1

Views

Author

Clark Kimberling, Jul 16 2020

Keywords

Comments

In general, let u(1) = 1, and let k be a positive integer. Define u(n) = least positive integer not in {u(1),..., u(n-1), v(1),...,v(n-1)} and v(n) = n - 1 + k + least positive integer not in {u(1),..., u(n-1), u(n), v(1),...,v(n-1)}. As sets, (u(n)) and (v(n)) are disjoint. If k >= -1, let a(n) = u(n) and b(n) = v(n) for all n >= 1, but if k <= -2, let a(n) = u(n) - k + 1 and b(n) = v(n) - k - 1 for all n >= 1. Then every positive integer is in exactly one of the sequences (a(n)) and (b(n)). The difference sequence of (a(n)) consists of 1's and 2's; the difference sequence of (b(n)) consists of 2's and 3's.
****
Guide to related sequences:
k sequences (a(n)) and (b(n))
0 A000201 and A001950 (lower and upper Wythoff sequences)

Examples

			a(1) = 1; b(1) = 1+2+2 = 5
a(2) = 2; b(2) = 2+2+3 = 7
a(3) = 3; b(3) = 3+2+4 = 9
a(4) = 4; b(4) = 4+2+6 = 12
		

Crossrefs

Cf. A336008.

Programs

  • Mathematica
    mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
    {a, b} = {{1}, {}}; k = 3;
    Do[AppendTo[b, Length[b] + k + mex[Flatten[{a, b}], Last[a]]];
    AppendTo[a, mex[Flatten[{a, b}], Last[a]]], {150}]
    a  (* A335999 *)
    b  (* A336008 *)
    (* Peter J. C. Moses, Jul 13 2020 *)

A352538 Primes whose position in the Wythoff array is immediately followed by another prime in the next column.

Original entry on oeis.org

2, 3, 7, 19, 23, 29, 67, 97, 103, 107, 149, 181, 227, 271, 311, 353, 379, 433, 449, 563, 631, 719, 761, 883, 919, 941, 971, 997, 1049, 1087, 1223, 1291, 1297, 1427, 1447, 1453, 1531, 1601, 1627, 1699, 1753, 1831, 1861, 1877, 2039, 2207, 2213, 2239, 2269, 2281, 2287
Offset: 1

Views

Author

Michel Marcus, Mar 20 2022

Keywords

Examples

			The Wythoff array begins:
   1    2    3    5    8 ...
   4    7   11   18   29 ...
   6   10   16   26   42 ...
   ...
So 2, 3 and 7 are terms, since they are horizontally followed by 3, 5 and 11.
		

Crossrefs

Cf. A003603, A022342, A035612, A035513 (Wythoff array).
Cf. A352537 (next row and column), A352539 (next row).

Programs

  • PARI
    T(n,k) = (n+sqrtint(5*n^2))\2*fibonacci(k+1) + (n-1)*fibonacci(k); \\ A035513
    cell(n) = for (r=1, oo, for (c=1, oo, if (T(r,c) == n, return([r, c])); if (T(r,c) > n, break);););
    isokh(m) = {my(pos = cell(prime(m))); isprime (T(pos[1], pos[2]+1))};
    lista(nn) = for (n=1, nn, if (isokh(n), print1(prime(n), ", ")));
    
  • PARI
    right(n) = n++; (sqrtint(5*n^2)+n-2)\2; \\ see A022342
    isokh(n) = isprime(right(n));
    lista(nn) = for (n=1, nn, my(p=prime(n)); if (isokh(p), print1(p, ", ")));

A063732 Numbers whose Lucas representation excludes L_0 = 2.

Original entry on oeis.org

0, 1, 3, 4, 5, 7, 8, 10, 11, 12, 14, 15, 16, 18, 19, 21, 22, 23, 25, 26, 28, 29, 30, 32, 33, 34, 36, 37, 39, 40, 41, 43, 44, 45, 47, 48, 50, 51, 52, 54, 55, 57, 58, 59, 61, 62, 63, 65, 66, 68, 69, 70, 72, 73, 75, 76, 77, 79, 80, 81, 83, 84, 86, 87, 88, 90
Offset: 1

Views

Author

Fred Lunnon, Aug 25 2001

Keywords

Comments

From Michel Dekking, Aug 26 2019: (Start)
This sequence is a generalized Beatty sequence. We know that A054770, the sequence of numbers whose Lucas representation includes L_0=2, is equal to A054770(n) = A000201(n) + 2*n - 1 = floor((phi+2)*n) - 1.
One also easily checks that the numbers 3-phi and phi+2 form a Beatty pair. This implies that the sequence with terms floor((3-phi)*n)-1 is the complement of A054770 in the natural numbers 0,1,2,...
It follows that a(n) = 3*n - floor(n*phi) - 2.
(End)

Crossrefs

Cf. A003622, A022342. Complement of A054770.
Partial sums of A003842.
Cf. A130310 (Lucas representation).

Formula

a(n) = floor((3-phi)*n)-1, where phi is the golden mean. - Michel Dekking, Aug 26 2019

A239003 Number of partitions of n into distinct Fibonacci numbers that are all greater than 2.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 0, 0, 2, 0, 0, 1, 0, 2, 0, 0, 2, 0, 1, 0, 0, 3, 0, 0, 2, 0, 2, 0, 0, 3, 0, 0, 1, 0, 3, 0, 0, 3, 0, 2, 0, 0, 4, 0, 0, 2, 0, 3, 0, 0, 3, 0, 1, 0, 0, 4, 0, 0, 3, 0, 3, 0, 0, 5, 0, 0, 2, 0, 4, 0, 0, 4, 0, 2, 0, 0, 5, 0, 0, 3, 0, 3, 0, 0, 4, 0, 0
Offset: 0

Views

Author

Clark Kimberling, Mar 08 2014

Keywords

Comments

a(n) > 0 if n+1 is a term of A003622; a(n) = 0 if n+1 is a term of A022342.

Examples

			There is one partition for n=0, the empty partition.  All parts are distinct, which means that there are no two parts that are equal. So a(0)=1.
		

Crossrefs

Programs

  • Maple
    F:= combinat[fibonacci]:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<4, 0,
           b(n, i-1)+`if`(F(i)>n, 0, b(n-F(i), i-1))))
        end:
    a:= proc(n) local j; for j from ilog[(1+sqrt(5))/2](n+1)
           while F(j+1)<=n do od; b(n, j)
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Mar 15 2014
  • Mathematica
    f = Table[Fibonacci[n], {n, 4, 75}];  b[n_] := SeriesCoefficient[Product[1 + x^f[[k]], {k, n}], {x, 0, n}]; u = Table[b[n], {n, 0, 60}]  (* A239003 *)
    Flatten[Position[u, 0]]  (* A022342 *)

Formula

G.f.: product(1 + x^F(j), j=4..infinity). - Wolfdieter Lang, Mar 15 2014

A372501 The 2-Zeckendorf array of the second kind, read by upward antidiagonals.

Original entry on oeis.org

0, 2, 1, 5, 4, 3, 7, 9, 8, 6, 10, 12, 16, 14, 11, 13, 17, 21, 27, 24, 19, 15, 22, 29, 35, 45, 40, 32, 18, 25, 37, 48, 58, 74, 66, 53, 20, 30, 42, 61, 79, 95, 121, 108, 87, 23, 33, 50, 69, 100, 129, 155, 197, 176, 142, 26, 38, 55, 82, 113, 163, 210, 252, 320, 286, 231
Offset: 1

Views

Author

A.H.M. Smeets, May 03 2024

Keywords

Comments

The 2-Zeckendorf array of the second kind is based on the dual Zeckendorf representation of numbers (see A104326).
Column k contains the numbers whose dual Zeckendorf expansion ends "... 0 1^(k-1)" where ^ denotes repetition.
Rows satisfy this recurrence: T(n,k+1) = T(n,k) + T(n,k-1) + 2 for all n > 0 and k > 1.
As a sequence, the array is a permutation of the nonnegative integers.
As an array, T is an interspersion (hence also a dispersion). This holds as well for all Zeckendorf arrays of the second kind.
In general, for the m-Zeckendorf array of the second kind, the row recursion is given by T(n,k) = T(n,k-1) + T(n,k-m) + m, and the first column represent the "even" numbers.

Examples

			Array begins:
       k=1    2    3    4    5    6    7
      +---------------------------------
  n=1 |  0    1    3    6   11   19   32
  n=2 |  2    4    8   14   24   40   66
  n=3 |  5    9   16   27   45   74  121
  n=4 |  7   12   21   35   58   95  155
  n=5 | 10   17   29   48   79  129  210
  n=6 | 13   22   37   61  100  163  265
  n=7 | 15   25   42   69  113  184  299
The same in dual Zeckendorf form shows the pattern of digit suffixes, for example column k=3 is all numbers ending 011:
          k=1      2       3        4
      +------------------------------
  n=1 |     0      1      11      111
  n=2 |    10    101    1011    10111
  n=3 |   110   1101   11011   110111
  n=4 |  1010  10101  101011  1010111
  n=5 |  1110  11101  111011  1110111
		

Crossrefs

Cf. A104326.
Rows n=1..3: A001911, A019274, A014739.
Columns k=1..3: A090909, A276885, A188012.
Cf. k-th prepended column: A022342 (k=1), A023444 (k=2).

Formula

T(n,1) = A090909(n+1).
T(1,k) = A001911(k-1).
T(2,k) = A019274(k-2).
T(3,k) = A014739(k-1).
T(n,1) = floor((n-1)*phi^2) and T(n,k+1) = floor((T(n,k)+1)*phi) for k > 0, where phi = (1+sqrt(5))/2. This can be considered as an alternative way to define the array.
Previous Showing 31-40 of 47 results. Next