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-10 of 17 results. Next

A129092 a(n) = A030067(2^n - 1) for n >= 1, where A030067 is the semi-Fibonacci numbers.

Original entry on oeis.org

1, 2, 5, 16, 69, 430, 4137, 64436, 1676353, 74555322, 5777029421, 792086153688, 194591768192733, 86534148901444102, 70244955881077121873, 104827174339054175240700, 289320796542222620694103961
Offset: 1

Views

Author

Paul D. Hanna, Mar 29 2007

Keywords

Examples

			The semi-Fibonacci sequence (A030067) starts:
[(1), 1, (2), 1, 3, 2, (5), 1, 6, 3, 9, 2, 11, 5, (16), 1, ...],
and obeys the recurrence:
A030067(n) = A030067(n/2) when n is even; and
A030067(n) = A030067(n-1) + A030067(n-2) when n is odd.
This sequence also equals row sums of triangle A129100:
    1;
    1,    1;
    2,    2,    1;
    5,    6,    4,   1;
   16,   24,   20,   8,   1;
   69,  136,  136,  72,  16,  1;
  430, 1162, 1360, 880, 272, 32, 1; ...
where columns of A129100 shift left under matrix square,
so that A129100^2 starts:
     1;
     2,    1;
     6,    4,   1;
    24,   20,   8,   1;
   136,  136,  72,  16,  1;
  1162, 1360, 880, 272, 32, 1; ...
		

Crossrefs

Programs

  • PARI
    /* Generated as column 0 of triangle A129100: */ a(n)=local(A=Mat(1),B);for(m=1,n+1,B=matrix(m,m);for(r=1,m,for(c=1,r, if(r==c || r==1 || r==2,B[r,c]=1,if(c==1,B[r,1]=sum(i=1,r-1,A[r-1,i]), B[r,c]=(A^(2^(c-1)))[r-c+1,1])); )); A=B); return(A[n+1,1])

Formula

Equals the row sums and first column of triangle A129100: a(n) = A129100(n,0), where column 0 of matrix power A129100^(2^k) = column k of A129100 for k > 0.

A030068 The "semi-Fibonacci numbers": a(n) = A030067(2n - 1), where A030067 is the semi-Fibonacci sequence.

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 11, 16, 17, 23, 26, 35, 37, 48, 53, 69, 70, 87, 93, 116, 119, 145, 154, 189, 191, 228, 239, 287, 292, 345, 361, 430, 431, 501, 518, 605, 611, 704, 727, 843, 846, 965, 991, 1136, 1145, 1299, 1334, 1523, 1525, 1716, 1753, 1981, 1992, 2231, 2279, 2566
Offset: 1

Views

Author

Keywords

Comments

Also the unique values of A030067 sorted. - Ralf Stephan, Oct 28 2013
Also, the subsequence of record values of the semi-Fibonacci sequence A030067.
The first differences of this sequence give back A030067. - It is more natural to use offset 1 and a(n) = A060037(2n-1), rather than 0 and a(n) = A060037(2n+1): First, a set should have this offset, and this is indeed the set of values or the range of A030067, i.e., the set of semi-Fibonacci numbers. Second, A060037 also starts at index 1. Third, the sequence A284282(n) = (k such that A030067(2k-1)=n or 0 if there's no such k) is then the characteristic function of this sequence, with nonzero values read as 1. - M. F. Hasler, Mar 24 2017

Crossrefs

Cf. A030067. Bisections: A169739, A169740.

Programs

Formula

G.f.: x*(r(x) * r(x^2) * r(x^4) * r(x^8) * ...) where r(x) is (1 + 2x + x^2 + x^3 + x^4 + x^5 + ...). - Gary W. Adamson, Sep 02 2016
a(n+1) = a(n) + A060037(n). The above g.f. can be written as x*Product_{k=0,oo} (1/(1-x^2^k)+x^2^k). - M. F. Hasler, Mar 27 2017

Extensions

Offset changed to 1 by N. J. A. Sloane, Mar 27 2017

A129093 a(n) = A030067(2^(n+1) - 3) for n>=1, where A030067 is the semi-Fibonacci numbers.

Original entry on oeis.org

1, 3, 11, 53, 361, 3707, 60299, 1611917, 72878969, 5702474099, 786309124267, 193799682039045, 86339557133251369, 70158421732175677771, 104756929383173098118827, 289215969367883566518863261
Offset: 1

Views

Author

Paul D. Hanna, Mar 29 2007

Keywords

Examples

			This sequence also equals the row sums of the triangle formed from the semi-Fibonacci numbers (A030067) with 2^n terms in row n for n>=0:
n=0: 1;
n=1: 1, 2;
n=2: 1, 3, 2, 5;
n=3: 1, 6, 3, 9, 2, 11, 5, 16;
n=4: 1, 17, 6, 23, 3, 26, 9, 35, 2, 37, 11, 48, 5, 53, 16, 69; ...
and the rightmost border equals A129092(n) = A030067(2^n - 1).
The semi-Fibonacci numbers (A030067) start:
[1, (1), 2, 1, (3), 2, 5, 1, 6, 3, 9, 2, (11), 5, 16, 1, ...],
and obey the recurrence:
A030067(n) = A030067(n/2) when n is even; and
A030067(n) = A030067(n-1) + A030067(n-2) when n is odd.
This sequence also equals row sums of matrix square A129100^2:
1;
2, 1;
6, 4, 1;
24, 20, 8, 1;
136, 136, 72, 16, 1;
1162, 1360, 880, 272, 32, 1; ...
		

Crossrefs

Programs

  • PARI
    /* As row sums of the matrix square of triangle A129100: */
    a(n)=local(A=Mat(1),B);for(m=1,n+1,B=matrix(m,m);for(r=1,m,for(c=1,r, if(r==c || r==1 || r==2, B[r,c]=1, if(c==1, B[r,1]=sum(i=1,r-1,A[r-1,i]), B[r,c]=(A^(2^(c-1)))[r-c+1,1])))); A=B); sum(k=1,n,(A^2)[n,k])
    for(n=1,20,print1(a(n),", "))

Formula

Equals the first differences of A129092: a(n) = A129092(n+1) - A129092(n).
Equals the row sums of the matrix square of triangle A129100.

A129094 a(n) = A030067(2^n + 2^(n-1) - 1) for n>=1, where A030067 gives the semi-Fibonacci numbers.

Original entry on oeis.org

1, 3, 9, 35, 189, 1523, 19409, 407067, 14448821, 886912635, 95777365753, 18445977557011, 6405629912921517, 4047190499790323395, 4687597187390655089313, 10017007133285072336267467
Offset: 1

Views

Author

Paul D. Hanna, Mar 29 2007

Keywords

Examples

			This sequence equals the central terms of the triangle formed from the semi-Fibonacci numbers (A030067) with 2^n terms in row n for n>=1:
n=0: 1;
n=1: (1), 2;
n=2: 1, (3), 2, 5;
n=3: 1, 6, 3, (9), 2, 11, 5, 16;
n=4: 1, 17, 6, 23, 3, 26, 9, (35), 2, 37, 11, 48, 5, 53, 16, 69; ...
The semi-Fibonacci numbers (A030067) start:
[1, (1), 2, 1, (3), 2, 5, 1, 6, 3, (9), 2, 11, 5, 16, 1, ...],
and obey the recurrence:
A030067(n) = A030067(n/2) when n is even; and
A030067(n) = A030067(n-1) + A030067(n-2) when n is odd.
		

Crossrefs

Programs

  • PARI
    
    				

A284282 a(n) = the number k such that A030067(2k-1) = n, or 0 if n does not occur in the semi-Fibonacci sequence A030067.

Original entry on oeis.org

0, 1, 2, 3, 0, 4, 5, 0, 0, 6, 0, 7, 0, 0, 0, 0, 8, 9, 0, 0, 0, 0, 0, 10, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18
Offset: 0

Views

Author

M. F. Hasler, Mar 24 2017

Keywords

Comments

Otherwise said, a(n) = round(m/2) = (m+1)/2, where m is the smallest index such that A030067(m) = n.
Any integer n which occurs in A030067 first occurs as an odd-indexed term A030067(2k-1) = A030068(k-1), and thereafter at indices (2k-1)*2^j, j=1,2,3,... (Both of these statements follow immediately from the definition of even-indexed terms of A030067.)
It is easy to see that no n can occur a second time as an odd-indexed term in A030067. This follows from the definition of these terms A030067(2k+1) = A030067(2k-1) + A030067(k), which shows that the subsequence of odd-indexed terms (A030068) is strictly increasing, and therefore equal to the range (or: set) of all semi-Fibonacci numbers.
Setting all nonzero terms to 1, this sequence is the characteristic function of A030068 (up to the offset).

Crossrefs

Cf. A030067 (semi-Fibonacci sequence), A030068 (bisection of odd-indexed terms, also equal to the range = set of all possible values or semi-Fibonacci numbers).

Programs

  • Mathematica
    a[n_] := a[n] = Which[n == 1, 1, EvenQ@ n, a[n/2], True, a[n - 1] + a[n - 2]]; With[{nn = 87}, Function[s, Function[t, {0}~Join~ReplacePart[t, Map[# -> First@ Lookup[s, #] &, TakeWhile[Keys@ s, # <= nn &]]]]@ ConstantArray[0, nn]]@ PositionIndex@ Array[a[2 # - 1] &, 10^3]] (* Michael De Vlieger, Mar 25 2017, Version 10, after Jean-François Alcover at A030067 *)
  • PARI
    A284282(n)=setsearch(A030068_vec,n) \\ Use, e.g., A030068(100) to compute the global variable A030068_vec far enough for n <= 22880. - M. F. Hasler, Mar 25 2017

A109671 a(1)=1; thereafter, a(2n)=a(n), a(2n+1) is the smallest positive number such that |a(2n+1)-a(2n-1)|=a(n).

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 3, 1, 2, 1, 1, 2, 3, 3, 6, 1, 5, 2, 3, 1, 2, 1, 1, 2, 3, 3, 6, 3, 3, 6, 9, 1, 8, 5, 3, 2, 1, 3, 4, 1, 3, 2, 1, 1, 2, 1, 1, 2, 3, 3, 6, 3, 3, 6, 9, 3, 6, 3, 3, 6, 9, 9, 18, 1, 17, 8, 9, 5, 4, 3, 1, 2, 3, 1, 2, 3, 5, 4, 1, 1, 2, 3, 5, 2, 3, 1, 2, 1, 1, 2, 3, 1, 2, 1, 1, 2, 3, 3, 6, 3, 3, 6, 9, 3
Offset: 1

Views

Author

Eric Angelini, Apr 30 2010

Keywords

Comments

A variant of the semi-Fibonacci numbers A030067.
Self-describing: the sequence of the absolute differences between odd-indexed terms is the sequence itself.
It appears that the record values form sequence A038754 and occur at indices of the form 2^k-1. - N. J. A. Sloane, May 02 2010
Does the sequence contain every positive integer (cf. A169741)?

Crossrefs

A variant of A030067. Cf. A169741-A169745.

Programs

  • Haskell
    import Data.List (transpose)
    a109671 n = a109671_list !! (n-1)
    a109671_list = concat (transpose [1 : f 1 a109671_list, a109671_list])
       where f u (v:vs) = y : f y vs where
               y = if u > v then u - v else u + v
    -- Reinhard Zumkeller, Jul 07 2013
  • Maple
      f:=proc(n) option remember; local t1;
        if n = 1 then 1
        elif n mod 2 = 0 then f(n/2)
        else t1:= f(n-2)-f((n-1)/2);
     if t1 > 0 then t1 else f(n-2)+f((n-1)/2) fi fi end;
  • Mathematica
    a[1] = 1; a[n_?EvenQ] := a[n/2]; a[n_] := a[n] = If[t1 = a[n-2] - a[(n-1)/2]; t1 > 0, t1, a[n-2] + a[(n-1)/2]]; Table[a[n], {n, 1, 104}] (* Jean-François Alcover, Nov 27 2012, after Maple *)

Extensions

Edited by N. J. A. Sloane, May 02 2010

A129100 Triangle T, read by rows, where column n of T = column 0 of T^(2^n) for n>0, such that column 0 (A129092) equals the row sums of the prior row, starting with T(0,0)=1.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 5, 6, 4, 1, 16, 24, 20, 8, 1, 69, 136, 136, 72, 16, 1, 430, 1162, 1360, 880, 272, 32, 1, 4137, 15702, 21204, 16032, 6240, 1056, 64, 1, 64436, 346768, 537748, 461992, 214336, 46784, 4160, 128, 1, 1676353, 12836904, 22891448, 21944520
Offset: 0

Views

Author

Paul D. Hanna, Mar 29 2007

Keywords

Comments

T(n,0) = A129092(n) = A030067(2^n - 1) for n>0 where A030067 is the Semi-Fibonacci numbers.

Examples

			Column 0 of row n equals A129092(n) = A030067(2^n-1) for n>=1,
where A030067 is the semi-Fibonacci numbers:
[(1), 1, (2), 1, 3, 2, (5), 1, 6, 3, 9, 2, 11, 5, (16), 1, ...],
which obey the recurrence:
A030067(n) = A030067(n/2) when n is even; and
A030067(n) = A030067(n-1) + A030067(n-2) when n is odd.
Triangle begins:
1;
1, 1;
2, 2, 1;
5, 6, 4, 1;
16, 24, 20, 8, 1;
69, 136, 136, 72, 16, 1;
430, 1162, 1360, 880, 272, 32, 1;
4137, 15702, 21204, 16032, 6240, 1056, 64, 1;
64436, 346768, 537748, 461992, 214336, 46784, 4160, 128, 1;
1676353, 12836904, 22891448, 21944520, 11720016, 3107456, 361856, 16512, 256, 1; ...
where columns shift left under matrix square, A129100^2, which starts:
1;
2, 1;
6, 4, 1;
24, 20, 8, 1;
136, 136, 72, 16, 1;
1162, 1360, 880, 272, 32, 1; ...
Inserting a left column of all 1's, yields matrix A129104:
1, 1;
1, 1, 1;
1, 2, 2, 1;
1, 5, 6, 4, 1;
1, 16, 24, 20, 8, 1;
1, 69, 136, 136, 72, 16, 1; ...
where row 0 of matrix power A129104^k forms row k of A129100,
as illustrated below.
For row 2: A129104^2 begins:
2, 2, 1;
3, 4, 3, 1;
6, 12, 12, 6, 1;
17, 54, 65, 42, 12, 1;
70, 362, 512, 400, 156, 24, 1;
431, 3708, 6223, 5656, 2744, 600, 48, 1; ...
and row 0 of A129104^2 equals row 2 of A129100: [2, 2, 1].
For row 3: A129104^3 begins:
5, 6, 4, 1;
11, 18, 16, 7, 1;
37, 88, 96, 56, 14, 1;
191, 672, 860, 609, 210, 28, 1;
1525, 8038, 11956, 9856, 4256, 812, 56, 1; ...
and row 0 of A129104^3 equals row 3 of A129100: [5, 6, 4, 1].
For row 4: A129104^4 begins:
16, 24, 20, 8, 1;
53, 112, 116, 64, 15, 1;
292, 890, 1088, 736, 240, 30, 1;
2571, 11350, 16056, 12664, 5185, 930, 60, 1; ...
and row 0 of A129104^4 equals row 4 of A129100: [16, 24, 20, 8, 1].
		

Crossrefs

Cf. A030067 (Semi-Fibonacci); A129092 (row sums=column 0), A129101 (column 1), A129102 (column 2), A129103 (column 3); variant: A129104.

Programs

  • PARI
    T(n,k)=local(A=Mat(1),B);for(m=1,n+1,B=matrix(m,m);for(r=1,m,for(c=1,r, if(r==c || r==1 || r==2,B[r,c]=1,if(c==1,B[r,1]=sum(i=1,r-1,A[r-1,i]), B[r,c]=(A^(2^(c-1)))[r-c+1,1])); )); A=B); return(A[n+1, k+1])

Formula

Row k = row 0 of matrix power A129104^k, where A129104 equals triangle A129100 with an additional leftmost column of all 1's.

A129095 Semi-Pell numbers: a(n) = a(n/2) (n even), a(n) = 2*a(n-1) + a(n-2) (n odd >1), with a(1) = 1.

Original entry on oeis.org

1, 1, 3, 1, 5, 3, 11, 1, 13, 5, 23, 3, 29, 11, 51, 1, 53, 13, 79, 5, 89, 23, 135, 3, 141, 29, 199, 11, 221, 51, 323, 1, 325, 53, 431, 13, 457, 79, 615, 5, 625, 89, 803, 23, 849, 135, 1119, 3, 1125, 141, 1407, 29, 1465, 199, 1863, 11, 1885, 221, 2327, 51, 2429, 323
Offset: 1

Views

Author

Paul D. Hanna, Apr 11 2007

Keywords

Comments

Bisection A129096 is monotonically increasing.

Examples

			Terms may be arranged into an irregular-shaped triangle:
  1;
  1, 3;
  1, 5, 3, 11;
  1, 13, 5, 23, 3, 29, 11, 51;
  1, 53, 13, 79, 5, 89, 23, 135, 3, 141, 29, 199, 11, 221, 51, 323;
  ...
where final terms of rows form A129097,
central terms are given by A129098,
and row sums are equal to A129099.
		

Crossrefs

Cf. A030067 (semi-Fibonacci), A074364 (semi-tribonacci).

Programs

  • Mathematica
    Nest[Append[#1, If[EvenQ[#2], #1[[#2/2]], 2 #1[[-1]] + #1[[-2]] ] ] & @@ {#, Length@ # + 1} &, {1}, 61] (* Michael De Vlieger, Mar 10 2020 *)
  • PARI
    a(n)=if(n==1 || n==0,1,if(n%2==0,a(n/2),2*a(n-1)+a(n-2)))

A129101 Column 1 of triangle A129100; also equals column 0 of the matrix square of A129100.

Original entry on oeis.org

1, 2, 6, 24, 136, 1162, 15702, 346768, 12836904, 814033666, 90074891654, 17659668432744, 6211830230882472, 3960850942657072026, 4617438765658479411542, 9912250203901899238148640
Offset: 0

Views

Author

Paul D. Hanna, Mar 29 2007

Keywords

Crossrefs

Cf. A129100 (triangle); A129092 (column 0), A129102 (column 2), A129103 (column 3).

Programs

  • PARI
    a(n)=local(A=Mat(1),B);for(m=1,n+2,B=matrix(m,m);for(r=1,m,for(c=1,r, if(r==c || r==1 || r==2,B[r,c]=1,if(c==1,B[r,1]=sum(i=1,r-1,A[r-1,i]), B[r,c]=(A^(2^(c-1)))[r-c+1,1])); )); A=B); return(A[n+2,2])

Formula

a(n) = A129094(n+1) - A129093(n); a(n) = A030067(2^(n+1)+2^n-1) - A030067(2^(n+1)-3) for n>=0 where A030067 is the semi-Fibonacci numbers.

A074364 Semi-tribonacci numbers, from tribonacci by analogy with semi-Fibonacci sequence.

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 2, 7, 1, 10, 4, 15, 2, 21, 7, 30, 1, 38, 10, 49, 4, 63, 15, 82, 2, 99, 21, 122, 7, 150, 30, 187, 1, 218, 38, 257, 10, 305, 49, 364, 4, 417, 63, 484, 15, 562, 82, 659, 2, 743, 99, 844, 21, 964, 122, 1107, 7, 1236, 150, 1393, 30, 1573, 187, 1790, 1, 1978, 218
Offset: 0

Views

Author

Michael Joseph Halm, Feb 13 2003

Keywords

Examples

			a(4)=1 because a(4/2)=a(2)=1.
		

Crossrefs

Formula

a(0) = 0, a(1) = 1, a(2n) = a(n), a(2n+1) = a(2n)+a(2n-1)+a(2n-2)
Showing 1-10 of 17 results. Next