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

A104759 Concatenation of digits of natural numbers from n down to 1.

Original entry on oeis.org

1, 21, 321, 4321, 54321, 654321, 7654321, 87654321, 987654321, 1987654321, 1987654321, 101987654321, 1101987654321, 11101987654321, 211101987654321, 1211101987654321, 31211101987654321, 131211101987654321, 4131211101987654321, 14131211101987654321, 514131211101987654321
Offset: 1

Views

Author

Alexandre Wajnberg & Juliette Bruyndonckx, Apr 23 2005

Keywords

Examples

			a(11) = a(10) because no number may begin with 0.
a(9)= [123456789]101112131415...=987654321
a(10)=[1234567891]01112131415...=1987654321
a(11)=[12345678910]1112131415...=01987654321=1987654321
a(12)=[123456789101]112131415...=101987654321
a(13)=[1234567891011]12131415...=1101987654321
a(14)=[12345678910111]2131415...=11101987654321
a(15)=[123456789101112]131415...=211101987654321
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{t = Reverse@ Flatten@ IntegerDigits@ Range@ n, k}, Reap@ For[k = 1, k <= Length@ t, k++, Sow[FromDigits@ Take[t, -k]]] // Flatten // Rest]; f@ 14 (* Michael De Vlieger, Mar 23 2015 *)
    lst = {}; Do[lst = Join[lst, IntegerDigits[n]], {n, 1, 100}]; Table[FromDigits[Reverse[lst[[Range[1, n]]]]], {n, 1, Length[lst]}] (* Robert Price, Mar 24 2015 *)

Formula

a(n) = A138793(n) mod 10^(n-1). - R. J. Mathar, Sep 17 2011

A272525 Convolution of nonzero repunits (A002275) with themselves.

Original entry on oeis.org

1, 22, 343, 4664, 58985, 713306, 8367627, 96021948, 1083676269, 12071330590, 133058984911, 1454046639232, 15775034293553, 170096021947874, 1824417009602195, 19478737997256516, 207133058984910837, 2194787379972565158, 23182441700960219479, 244170096021947873800
Offset: 0

Views

Author

Ilya Gutkovskiy, May 02 2016

Keywords

Comments

Partial sums of A014925.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{22, -141, 220, -100}, {1, 22, 343, 4664}, 20]
    Table[(9 n (10^(n + 2) + 1) + 7 10^(n + 2) + 29)/729, {n, 0, 19}]
  • PARI
    A272525(n)=(9*n+7)*(10^(n+2)+1)\729+1 \\ M. F. Hasler, Nov 02 2016

Formula

O.g.f.: 1/((1 - 10*x)^2*(1 - x)^2).
E.g.f.: (29 + 9*x + 700*exp(9*x) + 9000*x*exp(9*x))*exp(x)/729.
a(n) = 22*a(n-1) - 141*a(n-2) + 220*a(n-3) - 100*a(n-4).
a(n) = (9*n(10^(n+2) + 1) + 7*10^(n+2) + 29)/729.
A010879(a(n)) = A010879(n+1).

A317824 a(n) = A000422(n)^^A000422(n) (mod 10^len(A000422(n))), where ^^ indicates tetration or hyper-4 (e.g., 3^^4 = 3^(3^(3^3))).

Original entry on oeis.org

1, 21, 721, 8721, 8721, 708721, 5708721, 65708721, 165708721, 65165708721, 1165165708721, 861165165708721, 5861165165708721, 5005861165165708721, 55005861165165708721, 48055005861165165708721, 8448055005861165165708721, 388448055005861165165708721, 49388448055005861165165708721
Offset: 1

Views

Author

Marco Ripà, Aug 10 2018

Keywords

Comments

For any n, a(n) (mod 10^len(A000422(n))) == a(n + 1) (mod 10^len(A000422(n))), where len(k) := number of digits in k. Assuming len(a(n))>1, this is a general property of every concatenated sequence with fixed rightmost digits (such as A061839 or A014925), as shown in Ripà's book "La strana coda della serie n^n^...^n".

Examples

			For n = 3, a(3) = 321^^321 (mod 10^3) = 721. In fact, a(3) (mod 10^3) == a(4) (mod 10^3), since 721 (mod 10^3) == 8721 (mod 10^3).
		

References

  • Marco Ripà, La strana coda della serie n^n^...^n, Trento, UNI Service, Nov 2011, page 60. ISBN 978-88-6178-789-6

Crossrefs

Cf. A000422, A058183, A171882 (tetration), A317903.

Programs

  • PARI
    tmod(b, n) = {if (b % n == 0, return (0)); if (b % n == 1, return (1)); if (gcd(b, n)==1, return (lift(Mod(b, n)^tmod(b, lift(znorder(Mod(b, n))))))); lift(Mod(b, n)^(eulerphi(n) + tmod(b, eulerphi(n))));}
    f(n) = my(t=n); forstep(k=n-1, 1, -1, t=t*10^#Str(k)+k); t; \\ A000422
    a(n) = my(x=f(n)); tmod(x, 10^#Str(x)); \\ Michel Marcus, Sep 12 2021

Formula

a(n) = (n_n-1_n-2_...2_1)^^(n_n-1_n-2...2_1) (mod 10^len(n_n-1_n-2..._2_1)), where len(k) := number of digits in k.

Extensions

More terms from Jinyuan Wang, Aug 30 2020

A317903 a(n) = A038394(n)^^A038394(n) (mod 10^len(A038394(n))), where ^^ indicates tetration or hyper-4 (e.g., 3^^4=3^(3^(3^3))).

Original entry on oeis.org

4, 76, 176, 4176, 314176, 91314176, 891314176, 80891314176, 88080891314176, 5288080891314176, 705288080891314176, 10705288080891314176, 2410705288080891314176, 912410705288080891314176, 42912410705288080891314176, 9242912410705288080891314176, 989242912410705288080891314176
Offset: 1

Views

Author

Marco Ripà, Aug 10 2018

Keywords

Comments

For any n >= 2, a(n) (mod 10^len(A038394(n))) == a(n + 1) (mod 10^len(A038394(n))), where len(k) := number of digits in k. Assuming len(a(n))>1, this is a general property of every concatenated sequence with fixed rightmost digits (such as A014925 or A092447), as shown in Ripà's book "La strana coda della serie n^n^...^n".

Examples

			For n = 6, a(6) = 13117532^^13117532 (mod 10^8) == 91314176.
		

References

  • Marco Ripà, La strana coda della serie n^n^...^n, Trento, UNI Service, Nov 2011, page 60. ISBN 978-88-6178-789-6

Crossrefs

Cf. A038394, A068670, A171882 (tetration), A317824.

Programs

  • PARI
    tmod(b, n) = {if (b % n == 0, return (0)); if (b % n == 1, return (1)); if (gcd(b, n)==1, return (lift(Mod(b, n)^tmod(b, lift(znorder(Mod(b, n))))))); lift(Mod(b, n)^(eulerphi(n) + tmod(b, eulerphi(n))));}
    f(n) = fromdigits(concat([digits(p) | p<-Vecrev(primes(n))])); \\ A038394
    a(n) = if (n==1, 4, my(x=f(n)); tmod(x, 10^#Str(x))); \\ Michel Marcus, Sep 12 2021

Formula

a(n) = (p(n)p(n-1)_p(n-2)...3_2)^^(p(n)_p(n-1)_p(n-2)...3_2) (mod 10^len(p(n)_p(n-1)_p(n-2)..._3_2)), where len(k) := number of digits in k.

Extensions

More terms from Jinyuan Wang, Aug 30 2020

A057138 Add (n mod 10)*10^(n-1) to the previous term, with a(0) = 0.

Original entry on oeis.org

0, 1, 21, 321, 4321, 54321, 654321, 7654321, 87654321, 987654321, 987654321, 10987654321, 210987654321, 3210987654321, 43210987654321, 543210987654321, 6543210987654321, 76543210987654321, 876543210987654321
Offset: 0

Views

Author

Henry Bottomley, Aug 12 2000

Keywords

Comments

Original definition: "Concatenate next digit at left hand end."
This is misleading, since the concatenation of 0 yields the same term (leading zeros vanish), but upon the next concatenation of 1, the 0 reappears - except for a(1), which according to that description should equal a(1)=10: It is surprising that in this only case where the 0 is indeed present, it disappears upon left-concatenation of the digit 1! - M. F. Hasler, Jan 13 2013
From Hieronymus Fischer, Jan 23 2013: (Start)
A definition which is also consistent is: Start with terms 0 and 1 and then concatenate the next digit at the left hand end. If the next digit is a zero, keep this zero in mind so that the following digit is a 1 preceding a 0.
The sequence terms are the terms of A057137 in reversed digit order. Based on this understanding, the anomaly for the indices 0 and 1 where the terms are 0 and 1 instead of 0 and 10 (what one would expect) becomes self-explaining. Also, the special behavior when the zero digit is encountered becomes clear.
Examples: a(3) = 321 = Reversal(A057137(3)),
a(10) = 987654321 = Reversal(A057137(10)) = Reversal(1234567890). (End)

Crossrefs

Alternative progression for n >= 10 compared with A000422 and A014925.
Cf. A057137 for reverse.

Programs

  • Maple
    ListTools:-PartialSums([seq((k mod 10)*10^(k-1), k=0..40)]); # Robert Israel, Jun 21 2017
  • Mathematica
    Join[{c = 0}, Table[c = c + Mod[n, 10]*10^(n - 1), {n, 18}]] (* T. D. Noe, Jan 30 2013 *)
    nxt[{n_,a_}]:={n+1,a+Mod[n+1,10]10^n}; NestList[nxt,{0,0},20][[;;,2]] (* Harvey P. Dale, Apr 06 2025 *)
  • PARI
    a(n)=sum(i=0,n,i%10*10^(i-1)) \\ M. F. Hasler, Jan 13 2013

Formula

a(n) = a(n-1) + 10^(n-1)*n - 10^n*floor(n/10) = A057139(n) mod 10^n.
a(n) = floor(((q/(10^10 - 1)) + q mod 10^(n mod 10))*10^(10*floor(n/10))), where q = 987654321. - Hieronymus Fischer, Jan 03 2013
G.f.: x(1-10(10x)^9 + 9(10x)^10)/((1-x) (1-10x)^2 (1-(10x)^10)). - Robert Israel, Jun 21 2017

Extensions

Better definition from M. F. Hasler, Jan 13 2013

A137233 Number of n-digit even numbers.

Original entry on oeis.org

5, 45, 450, 4500, 45000, 450000, 4500000, 45000000, 450000000, 4500000000, 45000000000, 450000000000, 4500000000000, 45000000000000, 450000000000000, 4500000000000000, 45000000000000000, 450000000000000000, 4500000000000000000, 45000000000000000000, 450000000000000000000
Offset: 1

Views

Author

Ctibor O. Zizka, Mar 08 2008

Keywords

Comments

From Kival Ngaokrajang, Oct 18 2013: (Start)
a(n) is also the total number of double rows identified numbers in n digit.
For example:
n = 1: 01 23 45 67 89 = 5 double rows;
n = 2: 1011 1213 1415 1617 1819...9899 = 45 double rows;
n = 3: 100101 102103 104105...998999 = 450 double rows;
The number of double rows is also A030656. (End)
a(n) is also the number of n-digit integers with an even number of even digits (A356929); a(5) = 45000 is the answer to the question 2 of the Olympiade Mathématique Belge in 2004 (link). - Bernard Schott, Sep 06 2022
a(n) is also the number of n-digit integers with an odd number of odd digits (A054684). - Bernard Schott, Nov 07 2022

Examples

			a(2) = 45 because there are 45 2-digit even numbers.
		

Crossrefs

Programs

Formula

a(n) = 9*10^(n-1)/2 if n > 1. - R. J. Mathar, May 23 2008
From Elmo R. Oliveira, Jul 23 2025: (Start)
G.f.: 5*x*(1-x)/(1-10*x).
E.g.f.: (-9 + 10*x + 9*exp(10*x))/20.
a(n) = 10*a(n-1) for n > 2.
a(n) = A052268(n)/2 for n >= 2. (End)

Extensions

Corrected and extended by R. J. Mathar, May 23 2008
More terms from Elmo R. Oliveira, Jul 23 2025

A064616 a(n) = (10^n-1)*(91/81)-n*10^n/9.

Original entry on oeis.org

9, 89, 789, 6789, 56789, 456789, 3456789, 23456789, 123456789, 123456789, -9876543211, -209876543211, -3209876543211, -43209876543211, -543209876543211, -6543209876543211, -76543209876543211, -876543209876543211, -9876543209876543211
Offset: 1

Views

Author

Henry Bottomley, Sep 26 2001

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{21,-120,100},{9,89,789},20] (* Harvey P. Dale, May 15 2022 *)
  • PARI
    { a=0; q=1; for (n=1, 150, a+=(10 - n)*q; q*=10; write("b064616.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 20 2009
    
  • PARI
    Vec(x*(100*x-9)/((x-1)*(10*x-1)^2) + O(x^100)) \\ Colin Barker, Sep 15 2014

Formula

a(n) = a(n-1)+(10-n)*10^(n-1) = (19-n)*A002275(n)-A064617(n) = 10*A002275(n)-A014925(n).
a(n) = 21*a(n-1)-120*a(n-2)+100*a(n-3). G.f.: x*(100*x-9) / ((x-1)*(10*x-1)^2). - Colin Barker, Sep 15 2014

A052245 Expansion of 10*x / ((1 - x) * (1 - 10*x)^2) in powers of x.

Original entry on oeis.org

0, 10, 210, 3210, 43210, 543210, 6543210, 76543210, 876543210, 9876543210, 109876543210, 1209876543210, 13209876543210, 143209876543210, 1543209876543210, 16543209876543210, 176543209876543210, 1876543209876543210, 19876543209876543210, 209876543209876543210
Offset: 0

Views

Author

Henry Bottomley, Feb 01 2000

Keywords

Comments

This is not the same as A052246. They differ at a(11) and beyond. - Michael Somos, Sep 14 2014

Crossrefs

Programs

  • Maple
    seq(sum(x*10^x,x=0..a),a=0..100); # Jorge Coveiro, Dec 22 2004
    a:=n->sum((10^(n-j)*(n-j)),j=0..n): seq(a(n), n=0..16); # Zerinvary Lajos, Jun 05 2008
  • PARI
    concat(0, Vec(-10*x/((x-1)*(10*x-1)^2) + O(x^100))) \\ Colin Barker, Sep 13 2014

Formula

a(n) = n*10^n+a(n-1), a(0) = 0; a(n) = ((9n-1)*10^n + 1) * 10 / 81; a(n) = A014925(n)*10.
a(n) = 21*a(n-1)-120*a(n-2)+100*a(n-3). - Colin Barker, Sep 13 2014
G.f.: -10*x / ((x-1)*(10*x-1)^2). - Colin Barker, Sep 13 2014

Extensions

More terms from Colin Barker, Sep 13 2014

A371720 a(n) = m^^m mod 10^len(m), where m = A038399(n) and ^^ indicates tetration or hyper-4.

Original entry on oeis.org

1, 11, 811, 3811, 63811, 763811, 3763811, 5103763811, 515103763811, 19515103763811, 6819515103763811, 8146819515103763811, 3808146819515103763811, 7213808146819515103763811, 9807213808146819515103763811, 4939807213808146819515103763811
Offset: 1

Views

Author

Marco Ripà, Apr 04 2024

Keywords

Comments

For any n, a(n) == a(n + 1) (mod 10^len(A038399(n))), where len(k) := number of digits in k. Assuming len(a(n)) > 1, this is a general property of every concatenated sequence with fixed rightmost digits (such as A014925, A061839, A092845, and A104759), as shown in Ripà's book "La strana coda della serie n^n^...^n".
Moreover, assuming n > 1, since A038399(n) is congruent to 11 (mod 20), the convergence speed of A038399(n)^^b (say, V(A038399(n), b) = {2, 1, 1, 1, ...}) is 2 at height 1 and becomes a unit value for any integer b > 1 (see Links). Hence, a(n) is given by A038399(n)^^len(A038399(n) - 1) (mod 10^len(A038399(n))), and also by A038399(n)^^len(A038399(n)) (mod 10^len(A038399(n))) since A038399(n)^^len(A038399(n)) == A038399(n)^^len(A038399(n) - 1) (mod 10^len(A038399(n))) holds for any n.

Examples

			a(8) is given by the rightmost 10 digits of 2113853211^^2113853211 and thus a(8) = 5103763811.
a(9) == a(8) (mod 10^10), i.e., the digits of a(9) end with the digits of a(8) (and then a(9) has 2 more preceding).
		

References

  • Marco Ripà, La strana coda della serie n^n^...^n, Trento, UNI Service, Nov 2011, page 60. ISBN 978-88-6178-789-6

Crossrefs

Cf. A000045 (Fibonacci), A038399, A171882 (tetration), A317824, A317903, A317905.

Formula

a(n) = A038399(n)^^(len(A038399(n)) - 1) mod 10^len(A038399(n)), where len(A038399(n)) = ceiling(log_10(A038399(n) + 1)).
Showing 1-9 of 9 results.