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 10 results.

A120819 Indices of primes in A057137.

Original entry on oeis.org

171, 277, 367, 561, 567, 18881
Offset: 1

Views

Author

Robert G. Wilson v, Jul 05 2006

Keywords

Comments

Digits are in ascending order beginning with 1 and after 9 comes 0.
Indices of primes in A057137.
All terms must end in 1 or 7: A057137(n) is even when n is even, and divisible by 3 iff n == 0, 2, 3, 5, 6, 8 or 9 (mod 10). - M. F. Hasler, Apr 14 2024
a(7) >= 100000. - Michael S. Branicky, Apr 07 2025

Examples

			a(1) = 12345678901234567890...01234567890...012345678901 = A057137(171) is the first prime term in A057137.
		

References

  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 61, 298.

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PrimeQ@ FromDigits@ Mod[Range@n, 10]; lst = {}; Do[ If[fQ@n, AppendTo[lst, n]; Print@n], {n, 10000}]; lst
    IntegerLength[Select[Table[FromDigits[PadRight[{},n,{1,2,3,4,5,6,7,8,9,0}]],{n,1,1001,2}],PrimeQ]] (* Harvey P. Dale, Feb 07 2024 *)
  • PARI
    N=0;for(n=1,600,if(ispseudoprime(N=10*N+n%10),print1(n", "))) \\ Charles R Greathouse IV, May 10 2014  (Comment: Surprisingly, this is faster than calling ispseudoprime() only when n ends in 1 or 7, even when much larger N's are considered, e.g., up to 3000. - M. F. Hasler, Apr 14 2024)
    
  • Python
    from sympy import isprime
    L = ['8901', '234567']; s = '1234567'; c = len(s); m = 0
    while c < 18881:
        s += L[m%2]; c = len(s); m += 1
        if isprime(int(s)): print(c, end = ', ')  # Ya-Ping Lu, Jan 24 2025

Extensions

a(6) from Arjen Lenstra, Feb 20 2012

A073844 a(1) = 1, a(n) = largest prime divisor of A057137(n).

Original entry on oeis.org

1, 3, 41, 617, 823, 643, 9721, 14593, 3803, 3803, 14405693, 10288065751, 116216501, 12079920647, 7552031, 435503, 1763668414462081, 106377431, 27961, 27961, 205126079, 84225392753, 7347135846537257, 437274720469, 12792129877, 244251294564157
Offset: 1

Views

Author

Jason Earls, Sep 02 2002

Keywords

Crossrefs

Programs

  • PARI
    a(n) = if(n==1, 1, vecmax(factor(sum(i=1, n, i%10*10^(n-i)))[,1])); \\ Daniel Suteu, May 25 2022

Formula

a(n) = A006530(A057137(n)). - Michel Marcus, May 26 2022

A249181 a(n) = A057137(n)^2 where A057137 = 0,1,12,123,...,123...90,...

Original entry on oeis.org

0, 1, 144, 15129, 1522756, 152399025, 15241383936, 1524155677489, 152415765279684, 15241578750190521, 1524157875019052100, 152415787526596567801, 15241578753153483936144, 1524157875322755800955129, 152415787532374345526722756, 15241578753238669120562399025
Offset: 0

Views

Author

M. F. Hasler, Oct 22 2014

Keywords

Comments

A very common playful operation on pocket calculators is to type as many digits 123... as the display allows and then squaring it by pressing the "X" and then the "=" key. On basic pocket calculators this yields an overflow with the first digits of, e.g., a(8) displayed, viz "E 1524157.6".

Examples

			a(3) = 123^2 = 15129.
a(10) = 1234567890^2 = 1524157875019052100.
		

Programs

  • Magma
    [(137174210*10^n div 1111111111)^2: n in [0..20]]; // Vincenzo Librandi, Oct 23 2014
  • PARI
    print1(t=0);for(i=1,19,t=t*10+i%10;print1(","t*t))
    
  • PARI
    A249181(n)=(137174210*10^n\1111111111)^2
    

Formula

For n<10, a(n) = A014824(n)^2 = floor(10^(n+1)/81-n/9)^2.
a(n) ~ 1.524157875...*10^(2n-2).

A250296 Number n such that A057137(n) is a semiprime.

Original entry on oeis.org

3, 4, 7, 11, 17, 27, 31, 124, 157, 247
Offset: 1

Views

Author

Eric Chen, Dec 25 2014

Keywords

Comments

First unknown: 397.

Examples

			a(4) = 11 so A057137(11) = 12345678901 = 857 * 14405693 is a semiprime.
		

Crossrefs

A344633 Lengths k of k-digit integers of the form 1, 12, 123, 1234, ... (A057137) which are divisible by k.

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 10, 12, 14, 15, 16, 18, 30, 90, 96, 110, 197, 210, 270, 330, 390, 410, 630, 810, 930, 959, 990, 1110, 1170, 1210, 1230, 1470, 1710, 1890, 1956, 2310, 2430, 2530, 2538, 2710, 2730, 2790, 2802, 2922, 2970, 3330, 3510, 3519, 3630, 3690, 4115, 4245
Offset: 1

Views

Author

Reiner Moewald, May 26 2021

Keywords

Comments

It is easy to prove that 10*3^k, k >= 0 is always a solution.

Examples

			3 is a term since 123 is divisible by 3 (123 = 3*41).
		

Crossrefs

Cf. A057137.

Programs

  • Maple
    for n from 1 to 5000 do
        if modp(A057137(n),n) = 0 then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Aug 16 2021
  • PARI
    f(n) = 137174210*10^n\1111111111; \\ A057137
    isok(k) = (f(k) % k) == 0; \\ Michel Marcus, Aug 16 2021
  • Python
    a ="1234567890"
    for k in range(10):
        a = a + a
    sol = ""
    for n in range(1, len(a)):
        if int(a[0:n]) % n == 0:
            sol = sol + str(n) + ", "
    print(sol)
    

Formula

{n: n|A057137(n)}. - R. J. Mathar, Aug 16 2021

A007908 Triangle of the gods: to get a(n), concatenate the decimal numbers 1,2,3,...,n.

Original entry on oeis.org

1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789, 12345678910, 1234567891011, 123456789101112, 12345678910111213, 1234567891011121314, 123456789101112131415, 12345678910111213141516, 1234567891011121314151617, 123456789101112131415161718
Offset: 1

Views

Author

R. Muller

Keywords

Comments

For the name "triangle of the gods" see Pickover link. - N. J. A. Sloane, Dec 15 2019
Number of digits: A058183(n) = A055642(a(n)); sums of digits: A037123(n) = A007953(a(n)). - Reinhard Zumkeller, Aug 10 2010
Charles Nicol and John Selfridge ask if there are infinitely many primes in this sequence - see the Guy reference. - Charles R Greathouse IV, Dec 14 2011
Stephan finds no primes in the first 839 terms. I checked that there are no primes in the first 5000 terms. Heuristically there are infinitely many, about 0.5 log log n through the n-th term. - Charles R Greathouse IV, Sep 19 2012 [Expanded search to 20000 without finding any primes. - Charles R Greathouse IV, Apr 17 2014] [Independent search extended to 64000 terms without finding any primes. - Dana Jacobsen, Apr 25 2014]
Elementary congruence arguments show that primes can occur only at indices congruent to 1, 7, 13, or 19 mod 30. - Roderick MacPhee, Oct 05 2015
A note on heuristics: I wrote a quick program to count primes in sequences which are like A007908 but start at k instead of 1. I ran this for k = 1 to 100 and counted the primes up to 1000 (1000 possibilities for k = 1, 999 for k = 2, etc. up to 901 for k = 100). I then compared this to the expected count which is 0 if the number N is divisible by 2, 3, or 5 and 15/(4 log N) otherwise. (If N < 43 I counted the number as 1 instead.) k = 1 has 1.788 expected primes but only 0 actual (of course). k = 2 has 2.268 expected but 4 actual (see A262571, A089987). In total the expectation is 111.07 and the actual count is 110, well within the expected error of +/- 10.5. - Charles R Greathouse IV, Sep 28 2015
Early bird numbers for n > 1: a(2) = A116700(1) = 12; a(3) = A116700(52) = 123; a(4) = A116700(725) = 1234; a(5) = A116700(8074) = 12345; a(6) = A116700(85846) = 123456. - Reinhard Zumkeller, Dec 13 2012
For n < 10^6, a(n)/A000217(n) is an integer for n = 1, 2, and 5. The integers are 1, 4, and 823 (a prime), respectively. - Derek Orr, Sep 04 2014; Max Alekseyev, Sep 30 2015
In order to be a prime, a(n) must end in a digit 1, 3, 7 or 9, so only 4 among 10 consecutive values can be prime. (But a(64000) already has A058183(64000) > 300000 digits.) Also, a(64001) and a(64011) and more generally a(64001+10k) is divisible by 3 unless k == 2 (mod 3), but for k = 2, 5, 8, ... 23 these are divisible by small primes < 999. a(64261) is the first serious candidate in this subsequence. - M. F. Hasler, Sep 30 2015
There are no primes in the first 10^5 terms. - Max Alekseyev, Oct 03 2015; Oct 11 2015
There are no primes in the first 200000 terms. - Serge Batalov, Oct 24 2015
There is a distributed project for continued search, using PRPNet/PFGW software; see the Mersenne Forum link below. - Serge Batalov, Oct 18 2015
It appears that the Mersenne Forum search reached n = 344869 without finding a prime, and was then abandoned. It would be nice if someone could recover the final version of that link from the Wayback machine - the Great Smarandache PRPrime search, http://99.121.249.54:1200 - so that we have a record of how far they searched. - N. J. A. Sloane, Apr 09 2018
The web page https://www.mersenneforum.org/showthread.php?t=20527&page=9 has a comment from Serge Balatov that seems to say that the search reached 10^6 without finding a prime. It would be nice to have this confirmed, and to get more details about how it was done. - N. J. A. Sloane, Dec 15 2019
The expected number of primes among the first million terms is about 0.6. - Ernst W. Mayer, Oct 09 2015
A few semiprimes exist among the early terms, but then become scarce: see A046461. For the base-2 analog of this sequence (A047778), there is a 15-decimal digit prime, but Hans Havermann has shown that the second prime would have more than 91000 digits. - N. J. A. Sloane, Oct 08 2015

References

  • R. K. Guy, Unsolved Problems in Number Theory, Section A3, page 15, of 3rd edition, Springer, 2010.

Crossrefs

See A057137 for another version.
Cf. A033307, A053064, A000422 (left concatenations)
If we concatenate 1 through n but leave out k, we get sequences A262571 (leave out 1) through A262582 (leave out 12), etc., and again we can ask for the smallest prime in each sequence. See A262300 for a summary of these results. Primes seem to exist if we search far enough. - N. J. A. Sloane, Sep 29 2015
Concatenation of first n numbers in other bases: 2: A047778, 3: A048435, 4: A048436, 5: A048437, 6: A048438, 7: A048439, 8: A048440, 9: A048441, 10: this sequence, 11: A048442, 12: A048443, 13: A048444, 14: A048445, 15: A048446, 16: A048447. - Dylan Hamilton, Aug 11 2010
Entries that give the primes in sequences of this type: A089987, A262298, A262300, A262552, A262555.
For semiprimes see A046461.
See also A007376 (the almost-natural numbers), A071620 (primes in that sequence).
See also A033307 (the Champernowne constant) and A176942 (the Champernowne primes). A262043 is a variant of the present sequence.
A002782 is an amusing cousin of this sequence.
Least prime factor: A075019.

Programs

  • Haskell
    a007908 = read . concatMap show . enumFromTo 1 :: Integer -> Integer
    -- Reinhard Zumkeller, Dec 13 2012
    
  • Magma
    [Seqint(Reverse(&cat[Reverse(Intseq(k)): k in [1..n]])): n in [1..17]];  // Bruno Berselli, May 27 2011
    
  • Maple
    A055642 := proc(n) max(1, ilog10(n)+1) ; end: A007908 := proc(n) if n = 1 then 1; else A007908(n-1)*10^A055642(n)+n ; fi ; end: seq(A007908(n),n=1..12) ; # R. J. Mathar, May 31 2008
    # second Maple program:
    a:= proc(n) a(n):= `if`(n=0, 0, parse(cat(a(n-1), n))) end:
    seq(a(n), n=1..22);  # Alois P. Heinz, Jan 12 2021
  • Mathematica
    Table[FromDigits[Flatten[IntegerDigits[Range[n]]]], {n, 20}] (* Alonso del Arte, Sep 19 2012 *)
    FoldList[#2 + #1 10^IntegerLength[#2] &, Range[20]] (* Eric W. Weisstein, Nov 06 2015 *)
    FromDigits /@ Flatten /@ IntegerDigits /@ Flatten /@ Rest[FoldList[List, {}, Range[20]]] (* Eric W. Weisstein, Nov 04 2015 *)
    FromDigits /@ Flatten /@ IntegerDigits /@ Rest[FoldList[Append, {}, Range[20]]] (* Eric W. Weisstein, Nov 04 2015 *)
  • Maxima
    a[1]:1$ a[n]:=a[n-1]*10^floor(log(10*n)/log(10))+n$ makelist(a[n],n,1,17);  /* Bruno Berselli, May 27 2011 */
    
  • PARI
    a(n)=my(s="");for(k=1,n,s=Str(s,k));eval(s) \\ Charles R Greathouse IV, Sep 19 2012
    
  • PARI
    A007908(n,a=0)={for(d=1,#Str(n),my(t=10^d);for(k=t\10,min(t-1,n),a=a*t+k));a} \\ M. F. Hasler, Sep 30 2015
    
  • Python
    def a(n): return int("".join(map(str, range(1, n+1))))
    print([a(n) for n in range(1, 18)]) # Michael S. Branicky, Jan 12 2021
    
  • Python
    from functools import reduce
    def A007908(n): return reduce(lambda i,j:i*10**len(str(j))+j,range(1,n+1)) # Chai Wah Wu, Feb 27 2023

Formula

a(n) = n + a(n-1)*10^A055642(n). - R. J. Mathar, May 31 2008
a(n) = floor(C*10^(A058183(n))) with C = A033307. - José de Jesús Camacho Medina, Aug 19 2015

Extensions

Name edited by N. J. A. Sloane, Dec 15 2019

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

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

A057139 Odd number of digits palindrome based on sequential digits.

Original entry on oeis.org

1, 121, 12321, 1234321, 123454321, 12345654321, 1234567654321, 123456787654321, 12345678987654321, 1234567890987654321, 123456789010987654321, 12345678901210987654321, 1234567890123210987654321, 123456789012343210987654321, 12345678901234543210987654321
Offset: 1

Views

Author

Henry Bottomley, Aug 12 2000

Keywords

Crossrefs

Alternative progression for n >= 10 compared with A002477.

Programs

  • Mathematica
    Array[FromDigits@ Join[#, Reverse@ Most@ #] &@ Mod[Range[#], 10] &, 15] (* Michael De Vlieger, Jan 28 2020 *)
  • PARI
    a(n)={fromdigits(vector(2*n-1, i, if(i<=n, i, 2*n-i)%10))} \\ Andrew Howroyd, Jan 27 2020

Formula

a(n) = 10^n*A057137(n-1) + A057138(n) = 10^(n-1)*A057137(n) + A057138(n-1).

Extensions

Terms a(13) and beyond from Andrew Howroyd, Jan 27 2020

A250297 Number n such that the n-th term of "concatenate next digit at right hand end (where the next digit after 9 is again 1)" is a semiprime.

Original entry on oeis.org

3, 4, 7, 13, 25, 34, 37, 97
Offset: 1

Views

Author

Eric Chen, Dec 26 2014

Keywords

Comments

First unknown: 361.

Examples

			a(4) = 13 so 1234567891234 = 2 * 617283945617 is a semiprime.
		

Crossrefs

Cf. A057137.
Showing 1-10 of 10 results.