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

A169739 a(n) = A030068(4n+1).

Original entry on oeis.org

1, 3, 6, 11, 17, 26, 37, 53, 70, 93, 119, 154, 191, 239, 292, 361, 431, 518, 611, 727, 846, 991, 1145, 1334, 1525, 1753, 1992, 2279, 2571, 2916, 3277, 3707, 4138, 4639, 5157, 5762, 6373, 7077, 7804, 8647, 9493, 10458, 11449, 12585, 13730, 15029, 16363, 17886, 19411
Offset: 0

Views

Author

N. J. A. Sloane, May 02 2010

Keywords

Crossrefs

Programs

  • Mathematica
    f[1]=1; f[n_?EvenQ]:=f[n]=f[n/2]; f[n_?OddQ]:=f[n]=f[n-1]+f[n-2]; a[n_]:=f[2*n+1]; Table[a[n], {n, 0, 100, 2}] (* Vincenzo Librandi, May 27 2019 *)

Formula

a(n) = A030067(4n-3). - George Beck, Jan 18 2020

A169740 a(n) = A030068(4n+3).

Original entry on oeis.org

2, 5, 9, 16, 23, 35, 48, 69, 87, 116, 145, 189, 228, 287, 345, 430, 501, 605, 704, 843, 965, 1136, 1299, 1523, 1716, 1981, 2231, 2566, 2863, 3261, 3638, 4137, 4569, 5140, 5675, 6367, 6984, 7781, 8531, 9490, 10339, 11423, 12440, 13721, 14875, 16328, 17697, 19409
Offset: 0

Views

Author

N. J. A. Sloane, May 02 2010

Keywords

Crossrefs

Programs

  • Mathematica
    f[1]=1; f[n_?EvenQ]:=f[n]=f[n/2]; f[n_?OddQ]:=f[n]=f[n-1]+f[n-2]; a[n_]:=f[4*n+3]; Table[a[n], {n, 0, 100}] (* Vincenzo Librandi, May 27 2019 *)
  • PARI
    {f(n) = if(n==1,1, if(n%2==0, f(n/2), f(n-1) + f(n-2)))};
    vector(50, n, n--; f(4*n+3)) \\ G. C. Greubel, May 29 2019
    
  • Sage
    def f(n):
        if (n==1): return 1
        elif (n%2==0): return f(n/2)
        else: return f(n-1) + f(n-2)
    [f(4*n+3) for n in (0..50)] # G. C. Greubel, May 29 2019

A228451 Recurrence: a(2n) = a(n), a(2n+1) = a(n) + 2n + 1, with a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 1, 4, 1, 6, 4, 11, 1, 10, 6, 17, 4, 17, 11, 26, 1, 18, 10, 29, 6, 27, 17, 40, 4, 29, 17, 44, 11, 40, 26, 57, 1, 34, 18, 53, 10, 47, 29, 68, 6, 47, 27, 70, 17, 62, 40, 87, 4, 53, 29, 80, 17, 70, 44, 99, 11, 68, 40, 99, 26, 87, 57, 120, 1, 66, 34, 101, 18, 87, 53, 124, 10, 83, 47, 122, 29, 106, 68
Offset: 0

Views

Author

Ralf Stephan, Oct 27 2013

Keywords

Comments

Unique values are 0,1,4,6,10,11,17,18,26,27,29,34,40,47,53,57,62,68...

Crossrefs

Programs

  • PARI
    a(n)=if(n<2,n==1,if(n%2,n+a(n-1),a(n/2)))

Formula

For m>0, a(2^m+1) = 2^m+2, a(2^m+2) = 2^(m-1)+2, a(2^m+3) = 3*2^m+5, a(2^m+2^(m-1)) = 4, a(2^m-1) = 2^(m+1) - m - 2.

Extensions

Name corrected by Gionata Neri, Mar 27 2019

A229137 a(1) = a(2) = 1; if n == 0 (mod 3), then a(n) = a(n/3), otherwise a(n) = a(n-1) + a(n-2).

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 4, 5, 1, 6, 7, 2, 9, 11, 3, 14, 17, 1, 18, 19, 4, 23, 27, 5, 32, 37, 1, 38, 39, 6, 45, 51, 7, 58, 65, 2, 67, 69, 9, 78, 87, 11, 98, 109, 3, 112, 115, 14, 129, 143, 17, 160, 177, 1, 178, 179, 18, 197, 215, 19, 234, 253, 4, 257, 261, 23, 284
Offset: 1

Views

Author

Keywords

Comments

A distant cousin of Fibonacci numbers. - T. D. Noe, Sep 23 2013

Crossrefs

Cf. A030067.

Programs

  • Mathematica
    f[1] = f[2] = 1; f[n_] := f[n] =  If[Mod[n, 3] == 0, f[n/3], (f[n - 1] + f[n - 2])]; Table[f[n], {n, 100}]

A129104 Triangle T, read by rows, where row n (shifted left) of T equals row 0 of matrix power T^n for n>=0.

Original entry on oeis.org

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, 1, 430, 1162, 1360, 880, 272, 32, 1, 1, 4137, 15702, 21204, 16032, 6240, 1056, 64, 1, 1, 64436, 346768, 537748, 461992, 214336, 46784, 4160, 128, 1, 1, 1676353, 12836904
Offset: 0

Views

Author

Paul D. Hanna, Apr 14 2007

Keywords

Comments

This irregular-shaped triangle T results from inserting a left column of all 1's into triangle A129100; curiously, column k of A129100 equals column 0 of matrix power A129100^(2^k), while row n of A129100 equals row 0 of matrix power T^n (T is this triangle).

Examples

			Triangle T begins:
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 T^k forms row k of T shift left,
as illustrated below.
For row 2: the matrix square T^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 T^2 equals row 2 of T shift left: [2, 2, 1].
For row 3: the matrix cube T^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 T^3 equals row 3 of T shift left: [5, 6, 4, 1].
For row 4: T^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 T^4 equals row 4 of T shift left: [16, 24, 20, 8, 1].
		

Crossrefs

Cf. A030067 (Semi-Fibonacci); A129092 (column 1), A129101 (column 2), A129102 (column 3), A129103 (column 4); variant: A129100.

Programs

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

Formula

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

A169747 a(1)=1; thereafter, a(2n)=a(n), a(2n+1) = a(2n-1)-a(n) if that number is positive and not already in the sequence, otherwise a(2n+1) = a(2n-1)+a(n).

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 5, 1, 4, 3, 7, 2, 9, 5, 14, 1, 13, 4, 17, 3, 20, 7, 27, 2, 25, 9, 16, 5, 11, 14, 25, 1, 24, 13, 37, 4, 33, 17, 50, 3, 47, 20, 67, 7, 60, 27, 87, 2, 85, 25, 110, 9, 101, 16, 117, 5, 112, 11, 123, 14, 109, 25, 84, 1, 83, 24, 59, 13, 46, 37, 83, 4, 79, 33, 112, 17, 95
Offset: 1

Views

Author

N. J. A. Sloane, May 02 2010

Keywords

Comments

Suggested by A005132, A030067, A109671.

Programs

  • Mathematica
    a={1,1};Do[c=If[EvenQ[n],a[[n/2]],If[(b=a[[n-2]]-a[[(n-1)/2]])>0&&FreeQ[a,b],b,a[[n-2]]+a[[(n-1)/2]]]];AppendTo[a,c],{n,3,1000}];a (* Zak Seidov, May 04 2010 *)

Extensions

More terms from Zak Seidov, May 04 2010

A288310 a(0) = a(1) = 1; a(2*n) = a(n) - a(n-1), a(2*n+1) = Sum_{k=0..n} a(n-k).

Original entry on oeis.org

1, 1, 0, 2, -1, 2, 2, 4, -3, 3, 3, 5, 0, 7, 2, 11, -7, 8, 6, 11, 0, 14, 2, 19, -5, 19, 7, 26, -5, 28, 9, 39, -18, 32, 15, 40, -2, 46, 5, 57, -11, 57, 14, 71, -12, 73, 17, 92, -24, 87, 24, 106, -12, 113, 19, 139, -31, 134, 33, 162, -19, 171, 30, 210, -57, 192, 50, 224, -17, 239, 25
Offset: 0

Views

Author

Ilya Gutkovskiy, Jun 07 2017

Keywords

Comments

Sequence has its first differences and its partial sums as bisections.

Examples

			a(0) = a(1) = 1 by definition;
a(2) = a(2*1) = a(1) - a(0) = 0;
a(3) = a(2*1+1) = a(0) + a(1) = 2;
a(4) = a(2*2) = a(2) - a(1) = -1;
a(5) = a(2*2+1) = a(0) + a(1) + a(2) = 2;
a(6) = a(2*3) = a(3) - a(2) = 2, etc.
		

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[1] = 1; a[n_] := a[n] = If[EvenQ[n], a[n/2] - a[(n - 2)/2], Sum[a[(n - 1)/2 - k], {k, 0, (n - 1)/2}]]; Table[a[n], {n, 0, 70}]
  • Python
    def a(n): return 1 if n<2 else a(n/2) - a(n/2 - 1) if n%2==0 else sum([a((n - 1)/2 - k) for k in range((n + 1)/2)]) # Indranil Ghosh, Jun 08 2017

Formula

a(n) = Sum_{k=0..n} a(2*k).
a(n) = a(2*n+1) - a(2*n-1).
a(2*n+1) = Sum_{k=0..n} Sum_{m=0..k} a(2*m).
Previous Showing 11-17 of 17 results.