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 20 results. Next

A052161 Partial sums of A014825, second partial sums of A002450.

Original entry on oeis.org

1, 7, 34, 146, 599, 2417, 9696, 38820, 155325, 621355, 2485486, 9942022, 39768179, 159072821, 636291404, 2545165752, 10180663161, 40722652815, 162890611450, 651562446010
Offset: 0

Views

Author

Barry E. Williams, Jan 25 2000

Keywords

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, N.Y., 1964, pp. 194-196.

Crossrefs

Programs

  • Magma
    [((2^(2*n+7))-(9*(n^2)+51*n+74))/54: n in [0..25]]; // Vincenzo Librandi, Apr 28 2012
  • Mathematica
    CoefficientList[Series[1/((1-x)^3*(1-4*x)),{x,0,25}],x] (* Vincenzo Librandi, Apr 28 2012 *)

Formula

a(n) = ((2^(2n+7)) - (9*(n^2) + 51n + 74))/54.
a(n) = 4a(n-1) + C(n+2,2); a(0)=1.
a(n) = Sum_{k=0..n, binomial(n+3, k+3)3^k}. - Paul Barry, Aug 20 2004
G.f.: 1/((1-x)^3*(1-4*x)). - Colin Barker, Jan 12 2012

A014824 a(0) = 0; for n>0, a(n) = 10*a(n-1) + n.

Original entry on oeis.org

0, 1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789, 1234567900, 12345679011, 123456790122, 1234567901233, 12345679012344, 123456790123455, 1234567901234566, 12345679012345677, 123456790123456788, 1234567901234567899, 12345679012345679010, 123456790123456790121
Offset: 0

Views

Author

Keywords

Comments

The square roots of these numbers have some remarkable properties - see the link to Schizophrenic numbers.
Partial sums of A002275. - Jonathan Vos Post, Apr 25 2010
This sequence is the particular case of a(0) = 0, a(n) = r*a(n-1) + n, when r = 10. If now the first N terms are computed for (r > N) then the resulting set of numbers is readable as the smallest k-digits permutations (1 <= k <= N): Those built from the concatenation of the first k digits in base-r (see links). - R. J. Cano, Jan 09 2013
There is also an interesting structure to the decimal expansion of 1/sqrt(a(2*n+1)), which has long strings of 0's (that gradually shorten in length until they disappear) interspersed with strings of what, at first sight, appear to be random digits. However, if we factorize these blocks of 'random' digits we find they are related to each other. An example illustrating this is given below. - Peter Bala, Sep 13 2015
From Peter Bala, Sep 15 2015: (Start)
Extending the previous empirical observation, it appears that the decimal expansions of the numbers 1/ (a(4*n+1))^(1/2), 1/a((4*n+3))^(1/4), 1/(10*a(4*n))^(1/2), 1/(10*a(4*n+2))^(1/4), and their powers, have the same pattern of beginning with long strings of 0's (that gradually shorten in length until they disappear) interlaced with strings of digits which, when read as integers and factorized, turn out to be related to each other.
The following result, which is a consequence of Bottomley's explicit formula for a(n), should be helpful in explaining these observations: the decimal expansion of 1/a(2*n-1) for n >= 5 begins with long strings of 0's interlaced successively with the digits of the numbers 81*(18*n + 1)^k for k going from 0 up to approximately n/log_10(18*n). For example, for n = 7 we have 1/a(13) = 0.00000000000081000000000102870000000130644900000 165919023..., with 10287 = 81*127, 1306449 = 81*127^2 and 165919023 = 81*127^3. A similar result holds for the decimal expansion of the number 1/a(2*n).
It appears that a(4*n+3)^(1/4), a(4*n+3)^(3/4), (10*a(4*n))^(1/2), (10*a(4*n+2))^(1/4) and (10*a(4*n+2))^(3/4) are further examples of Brown's schizophrenic numbers.
A theorem of Kuzmin in the measure theory of continued fractions says that for a random real number alpha, the probability that some given partial quotient of alpha is equal to a positive integer k is given by 1/log(2)*( log(1 + 1/k) - log(1 + 1/(k+1)) ). Thus large partial quotients are the exception in continued fraction expansions. Empirically, we observe the presence of unexpectedly large partial quotients early in the continued fraction expansions of the numbers (a(4*n+1))^(1/2), (a(4*n+3))^(1/4), (10*a(4*n))^(1/2), (10*a(4*n+2))^(1/4) and their powers. An example is given below. (End)
From Ya-Ping Lu, Dec 21 2024: (Start)
To get a(n), concatenate the first n digits in the cyclic string '123456790' and subtract the number of occurrences of '9' from the concatenated number. For example, a(8) = 12345679 - 1 = 12345678.
There are 2 prime terms for n <= 20000: a(2497) and a(3301). (End)

Examples

			From _Peter Bala_, Sep 13 2015: (Start)
The decimal expansion of 1/sqrt(a(51)) begins 9.0...0211050...07423683750...02901423065625000... x 10^(-26). The long strings of 0's gradually shorten in length and are interspersed with eleven blocks of digits  [9, 21105, 742368375, 2901423065625, 1190671490555859375, 5025824361636282421875, 216068565680679841787109375, 940978603539360710982861328125, 4137365297437126626102768402099609375, 18326229731370116994398540261077880859375, 816525165681195562685426961332324981689453125]. Read as ordinary integers these numbers factorize as [3^2, (3^2)*5*7*67, (3^3)*(5^3)*(7^2)*(67^2), (3^2)*(5^5)*(7^3)*(67^3), (3^2)*(5^8)*(7^5)*(67^4), (3^4)*(5^8)*(7^6)*(67^5), (3^3)*(5^10)*(7^7)*11*(67^6), (3^3)*(5^11)*(7^7)*11*13*(67^7), (3^4)*(5^16)*(7^8)*11*13*(67^8), (3^2)*(5^17)*(7^9)*11*13*17*(67^9), (3^2)*(5^18)*(7^10)*11*13*17*19*(67^10)]. (End)
From _Peter Bala_, Sep 15 2015: (Start)
The continued fraction expansion of 1/sqrt(a(51)) begins [0; 11111111111111111111111111, 9, 47382136934375740345889, 2, 21, 3, 1, 7, 2, 1, 101028010521057015662, 5, 14, 9, 1, 1, 2, 2, 8, 5, 1, 1, 1, 1, 215411536292232442, 5, 1, 5, 1, 1, 2, 1, 1, 8, 1, 4, 3, 1, 4, 2, 1, 8, 1, 1, 3, 10, 459299650942926, 4, 1, 1, 4, 1, 20, 64, 5, 9, 2, 2, 1, 2, 1, 1, 1, 1, 30, 1, 11, 3, 979316952969, 1, 2, 93, 1, 5, 1, 1, 11, 1, 1, 1, 1, 5, 1, 29, 1, 29, 1, 1, 1, 2, 4, 1, 37, 1, 1, 2, 8, 2, 2088095848, 12, 1, 3, 1, 3, 2, 2, 3, 1, 5, 6, 1, 3, 1, 4, 2, 2, 1, 2, 2, 14, 4, 1, 2, 1, 50, 2, 6, 1, 11, 135, 4452229, 1, ...] and has several unexpectedly large partial quotients early on. (End)
For n=5, a(5) = 1*15 + 9*20 + 9^2*15 + 9^3*6 + 9^4*1 + 9^5*0 = 12345. - _Bruno Berselli_, Nov 13 2015
		

Crossrefs

Cf. A060011.
Cf. A002275. - Jonathan Vos Post, Apr 25 2010
Similar sequences in other bases are: (base-2) A000295, (base-3) A000340, (base-4) A014825, (base-5) A014827, (base-6) A014829. - R. J. Cano, Jan 11 2013
Differs from A007908, A035239, A057137, A060555, A138957 from n=10 on. - M. F. Hasler, Jan 17 2013
Cf. A030512.

Programs

  • Magma
    [(10^n-1)*(10/81)-n/9: n in [0..20]]; // Vincenzo Librandi, Aug 23 2011
    
  • Maple
    a:=n->sum((10^(n-j)-1^(n-j))/9,j=0..n): seq(a(n), n=0..17); # Zerinvary Lajos, Jan 15 2007
    a:=n->sum(10^(n-j)*j,j=0..n): seq(a(n), n=0..16); # Zerinvary Lajos, Jun 05 2008
  • Mathematica
    Table[Sum[10^i - 1, {i, n}]/9, {n, 18}] (* Robert G. Wilson v, Nov 20 2004 *)
    CoefficientList[Series[x/(1 - 12*x + 21*x^2 - 10*x^3), {x, 0, 20}], x] (* Wesley Ivan Hurt, Sep 15 2015 *)
  • PARI
    linrec01(p,u,base)={my(r=!p,A=1);for(j=2,u,A=A*base+r+p*j); A};
    a(n)=(n!=0)*linrec01(1, n, 10); \\ R. J. Cano, Jan 09 2011; With (0, n, 10) it generates repunit numbers.
    
  • PARI
    A014824(n)=(10^(n+1)\9-n)\9  \\ M. F. Hasler, Jan 17 2013
    
  • Python
    def A014824(n): s = ''.join('123456790'[i%9] for i in range(n)); q, r = divmod(n, 9); return int(s) - q - r//8 # Ya-Ping Lu, Dec 21 2024

Formula

a(n) = (10^n-1)*(10/81) - n/9. - Henry Bottomley, Jul 04 2000
a(n)/10^n converges to 10/81 = 0.123456790123456790...
Let b(n) = if(n = 0, 1, if(n = 1, 10, 10*9^(n-2))). Then a(n) = Sum_{k=0..n} C(n, k)*b(k) (Binomial transform). - Paul Barry, Jan 29 2004
G.f.: x/(1-12*x+21*x^2-10*x^3). - Colin Barker, Jan 08 2012
a(n) = 12*a(n-1) - 21*a(n-2) + 10*a(n-3), n>2. - Wesley Ivan Hurt, Sep 15 2015
a(n) = Sum_{i=0..n} 9^i*binomial(n+1,n-1-i). - Bruno Berselli, Nov 13 2015
a(n) = Sum_{i=0..n} 10^(n-i)*i. - Ya-Ping Lu, Dec 21 2024
E.g.f.: exp(x)*(10*exp(9*x) - 9*x - 10)/81. - Elmo R. Oliveira, Mar 29 2025

A048436 Take the first n numbers written in base 4, concatenate them, then convert from base 4 to base 10.

Original entry on oeis.org

1, 6, 27, 436, 6981, 111702, 1787239, 28595832, 457533321, 7320533146, 117128530347, 1874056485564, 29984903769037, 479758460304606, 7676135364873711, 491272663351917520, 31441450454522721297, 2012252829089454163026, 128784181061725066433683
Offset: 1

Views

Author

Patrick De Geest, May 15 1999

Keywords

Comments

There is no prime among the first 5000 terms (emails from Kurt Foster, Oct 21 2015 and Oct 24 2015). When is the first prime? - N. J. A. Sloane, Oct 25 2015
There is no prime among the first 45000 terms. - Giovanni Resta, Jun 07 2018

Examples

			a(7): (1)(2)(3)(10)(11)(12)(13) = 12310111213_4 = 1787239.
		

Crossrefs

Cf. A014825.
Concatenation of first n numbers in other bases: 2: A047778, 3: A048435, 4: this sequence, 5: A048437, 6: A048438, 7: A048439, 8: A048440, 9: A048441, 10: A007908, 11: A048442, 12: A048443, 13: A048444, 14: A048445, 15: A048446, 16: A048447. - Dylan Hamilton, Aug 11 2010

Programs

  • Magma
    [n eq 1 select 1 else Self(n-1) * 4^(1+Ilog(4,n)) + n: n in [1..20]]; // Jason Kimberley, Nov 27 2012
    
  • Mathematica
    a[n_]:= FromDigits[Flatten@IntegerDigits[Range@n, 4], 4]; Array[a, 20] (* Vincenzo Librandi, Dec 30 2012 *)
  • Python
    from functools import reduce
    def A048436(n): return reduce(lambda i,j:(i<<(bool((m:=j.bit_length())&1)<<1)+(m&-2))+j,range(n+1)) # Chai Wah Wu, Feb 26 2023

Formula

a(n) = a(n-1) * 4^(1 + floor(log4(n))) + n. [Moved from A117640 by Jason Kimberley, Nov 27 2012]

A126885 T(n,k) = n*T(n,k-1) + k, with T(n,1) = 1, square array read by ascending antidiagonals (n >= 0, k >= 1).

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 1, 4, 6, 4, 1, 5, 11, 10, 5, 1, 6, 18, 26, 15, 6, 1, 7, 27, 58, 57, 21, 7, 1, 8, 38, 112, 179, 120, 28, 8, 1, 9, 51, 194, 453, 543, 247, 36, 9, 1, 10, 66, 310, 975, 1818, 1636, 502, 45, 10, 1, 11, 83, 466, 1865, 4881, 7279, 4916, 1013, 55, 11
Offset: 0

Views

Author

Gary W. Adamson, Dec 30 2006

Keywords

Examples

			Square array begins:
  n\k | 1   2   3   4    5     6      7       8 ...
  -------------------------------------------------
    0 | 1   2   3   4    5     6      7       8 ... A000027
    1 | 1   3   6  10   15    21     28      36 ... A000217
    2 | 1   4  11  26   57   120    247     502 ... A000295
    3 | 1   5  18  58  179   543   1636    4916 ... A000340
    4 | 1   6  27 112  453  1818   7279   29124 ... A014825
    5 | 1   7  38 194  975  4881  24412  122068 ... A014827
    6 | 1   8  51 310 1865 11196  67183  403106 ... A014829
    7 | 1   9  66 466 3267 22875 160132 1120932 ... A014830
    8 | 1  10  83 668 5349 42798 342391 2739136 ... A014831
    ...
		

Crossrefs

Antidiagonal sums are A134195.
Main diagonal gives A062805.

Programs

  • Maxima
    T(n, k) := if k = 1 then 1 else n*T(n, k - 1) + k$
    create_list(T(n - k + 1, k), n, 0, 20, k, 1, n + 1);
    /* Franck Maminirina Ramaharo, Jan 26 2019 */

Formula

T(1,k) = k*(k + 1)/2, and T(n,k) = (k - (k + 1)*n + n^(k + 1))/(n^2 - 2*n + 1) elsewhere.
T(n,k) = third entry in the vector M^k * (1, 0, 0), where M is the following 3 X 3 matrix:
1, 0, 0
1, 1, 0
1, 1, n.

Extensions

Edited and name clarified by Franck Maminirina Ramaharo, Jan 26 2019

A221623 T(n,k)=Number of nXk arrays with each row a permutation of 1..k having at least as many downsteps as the preceding row.

Original entry on oeis.org

1, 2, 1, 6, 3, 1, 24, 27, 4, 1, 120, 410, 112, 5, 1, 720, 10055, 6120, 453, 6, 1, 5040, 353654, 738150, 85035, 1818, 7, 1, 40320, 17052210, 148700748, 51149685, 1130256, 7279, 8, 1, 362880, 1075295220, 49096652080, 57614883627, 3451956516, 14576404
Offset: 1

Views

Author

R. H. Hardin Jan 21 2013

Keywords

Comments

Table starts
.1..2.......6...........24.................120.........................720
.1..3......27..........410...............10055......................353654
.1..4.....112.........6120..............738150...................148700748
.1..5.....453........85035............51149685.................57614883627
.1..6....1818......1130256..........3451956516..............21241004664348
.1..7....7279.....14576404........230141263315............7575106427737240
.1..8...29124....183919920......15258126049410.........2638115823321645192
.1..9..116505...2282493365....1009051056050225.......902542985526634773509
.1.10..466030..27960543720...66655625407012320....304529313276100670030616
.1.11.1864131.338950264686.4400938611593606031.101620178879261858322711162

Examples

			Some solutions for n=3 k=4
..3..4..2..1....2..3..1..4....2..1..3..4....3..1..2..4....1..2..4..3
..2..1..4..3....2..3..1..4....4..1..2..3....3..2..4..1....3..4..1..2
..2..1..4..3....4..1..2..3....2..1..4..3....3..2..4..1....2..4..3..1
		

Crossrefs

Column 3 is A014825(n+1)
Row 1 is A000142

Formula

Empirical for column k:
k=1: a(n) = a(n-1)
k=2: a(n) = 2*a(n-1) -a(n-2)
k=3: a(n) = 6*a(n-1) -9*a(n-2) +4*a(n-3)
k=4: a(n) = 24*a(n-1) -166*a(n-2) +264*a(n-3) -121*a(n-4)
k=5: a(n) = 120*a(n-1) -4345*a(n-2) +52950*a(n-3) -93340*a(n-4) +44616*a(n-5)
k=6: a(n) = 720*a(n-1) -164746*a(n-2) +12686988*a(n-3) -321204409*a(n-4) +605003244*a(n-5) -296321796*a(n-6)
k=7: a(n) = 5040*a(n-1) -8349390*a(n-2) +5234439280*a(n-3) -936232732785*a(n-4) +51206316902496*a(n-5) -99624831647040*a(n-6) +49349521382400*a(n-7)

A353095 a(1) = 3; for n > 1, a(n) = 4*a(n-1) + 4 - n.

Original entry on oeis.org

3, 14, 57, 228, 911, 3642, 14565, 58256, 233019, 932070, 3728273, 14913084, 59652327, 238609298, 954437181, 3817748712, 15270994835, 61083979326, 244335917289, 977343669140, 3909374676543, 15637498706154, 62549994824597, 250199979298368, 1000799917193451
Offset: 1

Views

Author

Seiichi Manyama, Apr 23 2022

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{6, -9, 4}, {3, 14, 57}, 25] (* Amiram Eldar, Apr 23 2022 *)
  • PARI
    my(N=30, x='x+O('x^N)); Vec(x*(3-4*x)/((1-x)^2*(1-4*x)))
    
  • PARI
    a(n) = (2*4^(n+1)+3*n-8)/9;
    
  • PARI
    b(n, k) = sum(j=0, n-1, (k-n+j)*k^j);
    a(n) = b(n, 4);

Formula

G.f.: x * (3 - 4*x)/((1 - x)^2 * (1 - 4*x)).
a(n) = 6*a(n-1) - 9*a(n-2) + 4*a(n-3).
a(n) = 2 * A014825(n) + n.
a(n) = (2*4^(n+1) + 3*n - 8)/9.
a(n) = Sum_{k=0..n-1} (4 - n + k) * 4^k.
E.g.f.: exp(x)*(8*exp(3*x) + 3*x - 8)/9. - Stefano Spezia, May 28 2023

A160128 a(n) = number of grid points that are covered after (2^n)th stage of A139250.

Original entry on oeis.org

3, 7, 19, 63, 235, 919, 3651, 14575, 58267, 233031, 932083, 3728287, 14913099, 59652343, 238609315, 954437199, 3817748731, 15270994855, 61083979347, 244335917311, 977343669163, 3909374676567, 15637498706179
Offset: 0

Views

Author

Omar E. Pol, May 09 2009

Keywords

Crossrefs

Programs

  • PARI
    Vec((3 - 11*x + 4*x^2) / ((1 - x)^2*(1 - 4*x)) + O(x^40)) \\ Colin Barker, May 13 2020

Formula

a(n) = A147614(A000079(n)).
a(n) = (1/9)*(2^(2*n+3) + 12*n + 19). [Nathaniel Johnston, Mar 29 2011]
It appears that a(n) = A139252(2^(n+1)). - Omar E. Pol, Sep 11 2012
a(n) = 6*a(n-1) - 9*a(n-2) + 4*a(n-3). - Paul Curtz, May 07 2020
G.f.: (3 - 11*x + 4*x^2) / ((1 - x)^2*(1 - 4*x)). - Colin Barker, May 13 2020

Extensions

Terms after a(10) from Nathaniel Johnston, Mar 29 2011

A211019 Triangle read by rows: T(n,k) = number of squares and rectangles of area 2^(k-1) after 2^n stages in the toothpick structure of A139250, divided by 4, n>=1, k>=1, assuming the toothpicks have length 2.

Original entry on oeis.org

0, 0, 1, 2, 3, 1, 10, 13, 3, 1, 42, 53, 13, 3, 1, 170, 213, 53, 13, 3, 1, 682, 853, 213, 53, 13, 3, 1, 2730, 3413, 853, 213, 53, 13, 3, 1, 10922, 13653, 3413, 853, 213, 53, 13, 3, 1, 43690, 54613, 13653, 3413, 853, 213, 53, 13, 3, 1, 174762, 218453
Offset: 1

Views

Author

Omar E. Pol, Sep 24 2012

Keywords

Comments

All internal regions in the toothpick structure are squares and rectangles.

Examples

			Triangle begins:
0;
0,         1;
2,         3,     1;
10,       13,     3,    1;
42,       53,    13,    3,   1;
170,     213,    53,   13,   3,   1;
682,     853,   213,   53,  13,   3,  1;
2730,   3413,   853,  213,  53,  13,  3,  1;
10922, 13653,  3413,  853, 213,  53, 13,  3, 1;
43690, 54613, 13653, 3413, 853, 213, 53, 13, 3, 1;
		

Crossrefs

Row sums give 0 together with A014825.

Formula

T(n,k) = A211016(n,k)/4.
T(n,1) = A020988(n-2), n>=2.

A078904 a(n) = 4a(n-1) + 3n with a(0) = 0.

Original entry on oeis.org

0, 3, 18, 81, 336, 1359, 5454, 21837, 87372, 349515, 1398090, 5592393, 22369608, 89478471, 357913926, 1431655749, 5726623044, 22906492227, 91625968962, 366503875905, 1466015503680, 5864062014783, 23456248059198, 93824992236861
Offset: 0

Views

Author

Benoit Cloitre, Dec 12 2002

Keywords

Crossrefs

Max ( Fr(n, k) : 1<=k<=4^(n+1)-3) where Fr(x, y) is defined in A078903.

Programs

  • Maple
    a:=n->sum (4^j-1,j=1..n): seq(a(n),n=0..23); # Zerinvary Lajos, Jun 27 2007
  • Mathematica
    s=0;lst={};Do[s+=2^n-1;AppendTo[lst, s], {n, 0, 6!, 2}];lst (* Vladimir Joseph Stephan Orlovsky, Nov 07 2008 *)
  • PARI
    a(n)=(1/3)*(4^(n+1)-3*n-4)
    
  • Python
    def A078904(n): return ((1<<(n+1<<1))-4)//3-n # Chai Wah Wu, Nov 12 2024
  • Sage
    [gaussian_binomial(n,1,4)-n for n in range(1,25)] # Zerinvary Lajos, May 29 2009
    

Formula

G.f.: A(x) = -3x/(4x^3 - 9x^2 + 6x - 1).
a(n) = (1/3)*(4^(n+1) - 3*n - 4).
a(n) = 3*A014825(n). - Zerinvary Lajos, Jun 27 2007

Extensions

Additional formulas from Ralf Stephan, Dec 19 2002

A368529 a(n) = Sum_{k=1..n} k^2 * 4^(n-k).

Original entry on oeis.org

0, 1, 8, 41, 180, 745, 3016, 12113, 48516, 194145, 776680, 3106841, 12427508, 49710201, 198841000, 795364225, 3181457156, 12725828913, 50903315976, 203613264265, 814453057460, 3257812230281, 13031248921608, 52124995686961, 208499982748420, 833999930994305
Offset: 0

Views

Author

Seiichi Manyama, Dec 28 2023

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{7, -15, 13, -4}, {0, 1, 8, 41}, 30] (* Paolo Xausa, Jan 29 2024 *)
  • PARI
    a(n) = sum(k=1, n, k^2*4^(n-k));

Formula

G.f.: x * (1+x)/((1-4*x) * (1-x)^3).
a(n) = 7*a(n-1) - 15*a(n-2) + 13*a(n-3) - 4*a(n-4).
a(n) = A052161(n-1) + A052161(n-2) for n > 1.
a(n) = (5*4^(n+1) - (9*n^2 + 24*n + 20))/27.
a(0) = 0; a(n) = 4*a(n-1) + n^2.
Showing 1-10 of 20 results. Next