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

A162436 a(n) = 3*a(n-2) for n > 2; a(1) = 1, a(2) = 3.

Original entry on oeis.org

1, 3, 3, 9, 9, 27, 27, 81, 81, 243, 243, 729, 729, 2187, 2187, 6561, 6561, 19683, 19683, 59049, 59049, 177147, 177147, 531441, 531441, 1594323, 1594323, 4782969, 4782969, 14348907, 14348907, 43046721, 43046721, 129140163, 129140163, 387420489, 387420489, 1162261467
Offset: 1

Views

Author

Klaus Brockhaus, Jul 03 2009, Jul 05 2009

Keywords

Comments

Interleaving of A000244 and 3*A000244.
Unsigned version of A128019.
Partial sums are in A164123.
Apparently a(n) = A056449(n-1) for n > 1. a(n) = A108411(n) for n >= 1.
Binomial transform is A026150 without initial 1, second binomial transform is A001834, third binomial transform is A030192, fourth binomial transform is A161728, fifth binomial transform is A162272.

Crossrefs

Cf. A000244 (powers of 3), A128019 (expansion of (1-3x)/(1+3x^2)), A164123, A026150, A001834, A030192, A161728, A162272.
Essentially the same as A056449 (3^floor((n+1)/2)) and A108411 (powers of 3 repeated).

Programs

  • Magma
    [ n le 2 select 2*n-1 else 3*Self(n-2): n in [1..35] ];
    
  • Mathematica
    CoefficientList[Series[(-3*x - 1)/(3*x^2 - 1), {x, 0, 200}], x] (* Vladimir Joseph Stephan Orlovsky, Jun 10 2011 *)
    Transpose[NestList[{Last[#],3*First[#]}&,{1,3},40]][[1]] (* or *) With[{c= 3^Range[20]},Join[{1},Riffle[c,c]]](* Harvey P. Dale, Feb 17 2012 *)
  • PARI
    a(n)=3^(n>>1) \\ Charles R Greathouse IV, Jul 15 2011

Formula

a(n) = 3^((1/4)*(2*n - 1 + (-1)^n)).
G.f.: x*(1 + 3*x)/(1 - 3*x^2).
a(n+3) = a(n+2)*a(n+1)/a(n). - Reinhard Zumkeller, Mar 04 2011
E.g.f.: cosh(sqrt(3)*x) - 1 + sinh(sqrt(3)*x)/sqrt(3). - Stefano Spezia, Dec 31 2022

Extensions

G.f. corrected, formula simplified, comments added by Klaus Brockhaus, Sep 18 2009

A331787 T(b,n) is the largest m such that there exists N such that none of S(N), S(N+1), ..., S(N+m-1) is divisible by n, where S(N) is the sum of digits of N in base b. Square array read by ascending antidiagonals.

Original entry on oeis.org

0, 0, 2, 0, 1, 6, 0, 2, 4, 14, 0, 1, 2, 7, 30, 0, 2, 4, 6, 16, 62, 0, 1, 4, 3, 14, 25, 126, 0, 2, 2, 6, 8, 14, 52, 254, 0, 1, 4, 5, 4, 13, 30, 79, 510, 0, 2, 4, 6, 8, 10, 28, 62, 160, 1022, 0, 1, 2, 3, 8, 5, 22, 23, 62, 241, 2046, 0, 2, 4, 6, 8, 10, 12, 34, 48, 126, 484, 4094
Offset: 2

Views

Author

Jianing Song, Jan 25 2020

Keywords

Comments

Write n = (b-1)*s + t, 1 <= t <= b-1. The smallest N_0 such that none of S(N_0), S(N_0+1), ..., S(N_0+m-1) is divisible by n is given by N_0 = b^(u_0) - b^s*(t-gcd(t,b-1)+1) + 1, where u_0 is the smallest nonnegative solution to (b-1)*u == -gcd(t,b-1) (mod n). See my link below for more detailed information.

Examples

			Table begins
  b\n  1  2  3   4   5   6    7    8    9    10
   2   0  2  6  14  30  62  126  254  510  1022
   3   0  1  4   7  16  25   52   79  160   241
   4   0  2  2   6  14  14   30   62   62   126
   5   0  1  4   3   8  13   28   23   48    73
   6   0  2  4   6   4  10   22   34   46    34
   7   0  1  2   5   8   5   12   19   26    47
   8   0  2  4   6   8  10    6   14   30    46
   9   0  1  4   3   8   9   12    7   16    25
  10   0  2  2   6   8   8   12   14    8    18
		

Crossrefs

Cf. A331789.
Cf. A000918 (row 2), A164123 (row 3), A331786 (row 10).

Programs

  • PARI
    T(b,n) = my(s=(n-1)\(b-1), t=(n-1)%(b-1)+1); b^s*(2*t-gcd(t,b-1)+1)-2

Formula

If n = (b-1)*s + t, 1 <= t <= b-1, then T(b,n) = b^s*(2*t-gcd(t,b-1)+1) - 2. See my link for a proof of the formula.
T(b,n) = T(b,n-1) + b*T(b,n-b+1) - b*T(b,n-b) for b >= 2, n >= b+1.
T(b,n) = O(b^(n/(b-1))).

A164560 Partial sums of A164532.

Original entry on oeis.org

1, 5, 11, 35, 71, 215, 431, 1295, 2591, 7775, 15551, 46655, 93311, 279935, 559871, 1679615, 3359231, 10077695, 20155391, 60466175, 120932351, 362797055, 725594111, 2176782335, 4353564671, 13060694015, 26121388031, 78364164095
Offset: 1

Views

Author

Klaus Brockhaus, Aug 16 2009

Keywords

Comments

Interleaving of A164559 and A024062 without initial term 0.

Crossrefs

Cf. A164532, A164123 (partial sums of A162436), A164559 (6^n/3-1), A024062 (6^n-1), A026549.

Programs

  • Magma
    T:=[ n le 2 select 3*n-2 else 6*Self(n-2): n in [1..28] ]; [ n eq 1 select T[1] else Self(n-1)+T[n]: n in [1..#T]];

Formula

a(n) = 6*a(n-2)+5 for n > 2; a(1) = 1, a(2) = 5.
a(n) = (3-(-1)^n)*6^(1/4*(2*n-1+(-1)^n))/2-1.
G.f.: x*(1+4*x)/((1-x)*(1-6*x^2)).
a(n) = A026549(n) - 1.

A164265 Partial sums of A162766.

Original entry on oeis.org

4, 7, 19, 28, 64, 91, 199, 280, 604, 847, 1819, 2548, 5464, 7651, 16399, 22960, 49204, 68887, 147619, 206668, 442864, 620011, 1328599, 1860040, 3985804, 5580127, 11957419, 16740388, 35872264, 50221171, 107616799, 150663520, 322850404
Offset: 1

Views

Author

Klaus Brockhaus, Aug 11 2009

Keywords

Crossrefs

Cf. A162766, A164123 (partial sums of A162436).

Programs

  • Magma
    T:=[ n le 2 select 5-n else 3*Self(n-2): n in [1..33] ]; [ n eq 1 select T[1] else Self(n-1)+T[n]: n in [1..#T]];
    
  • Mathematica
    LinearRecurrence[{1,3,-3},{4,7,19},40] (* Harvey P. Dale, Aug 28 2016 *)
  • PARI
    a(n)=if(n%2,15,7)*3^(n\2)\2-3 \\ Charles R Greathouse IV, Jul 15 2011

Formula

a(n) = 3*a(n-2)+7 for n > 2; a(1) = 4, a(2) = 7.
a(n) = (11-4*(-1)^n)*3^(1/4*(2*n-1+(-1)^n))/2-7/2.
G.f.: x*(4+3*x)/((1-x)*(1-3*x^2)).

A358027 Expansion of g.f.: (1 + x - 2*x^2 + 2*x^4)/((1-x)*(1-3*x^2)).

Original entry on oeis.org

1, 2, 3, 6, 11, 20, 35, 62, 107, 188, 323, 566, 971, 1700, 2915, 5102, 8747, 15308, 26243, 45926, 78731, 137780, 236195, 413342, 708587, 1240028, 2125763, 3720086, 6377291, 11160260, 19131875, 33480782, 57395627
Offset: 0

Views

Author

G. C. Greubel, Oct 31 2022

Keywords

Crossrefs

Programs

  • Magma
    I:=[3,6,11]; [1,2] cat [n le 3 select I[n] else Self(n-1) +3*Self(n-2) -3*Self(n-3): n in [1..60]];
    
  • Mathematica
    LinearRecurrence[{1,3,-3}, {1,2,3,6,11}, 61]
  • SageMath
    def A254006(n): return 3^(n/2)*(1 + (-1)^n)/2
    def A358027(n): return (1/3)*( 4*A254006(n) + 7*A254006(n-1) +2*int(n==0) + 2*int(n==1) - 3 )
    [A358027(n) for n in (0..60)]

Formula

a(n) = (1/3)*(2*[n=0] + 2*[n=1] - 3 + 4*A254006(n) + 7*A254006(n-1)).
a(n) = a(n-1) - 3*a(n-2) + 3*a(n-3), for n >= 5.
E.g.f.: (1/3)*( 2 + 2*x - 3*exp(x) + 4*cosh(sqrt(3)*x) + (7/sqrt(3))*sinh(sqrt(3)*x) ).
G.f.: (1 +x -2*x^2 +2*x^4)/((1-x)*(1-3*x^2)). - Clark Kimberling, Oct 31 2022
Showing 1-5 of 5 results.