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

A050687 Numbers k such that A000422(k) is squarefree.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 16, 19, 20, 21, 22, 23, 24, 25, 28, 29, 30, 31, 32, 33, 34, 37, 38, 39, 40, 41, 42, 43, 46, 47, 48, 49, 50, 51, 52, 55, 57, 58, 59, 60, 61, 64, 65, 66, 67, 68, 69, 70, 73, 74, 75, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1999

Keywords

Crossrefs

Extensions

More terms from and name clarified by Sean A. Irvine, Aug 17 2021
Offset changed to 1 by Jinyuan Wang, Sep 04 2021

A050688 Numbers k such that A000422(k) is nonsquarefree.

Original entry on oeis.org

8, 9, 15, 17, 18, 26, 27, 35, 36, 44, 45, 53, 54, 56, 62, 63, 71, 72, 80, 81, 89, 90, 98, 99, 107, 108, 109
Offset: 1

Views

Author

Patrick De Geest, Aug 15 1999

Keywords

Examples

			a(2)=9 because 987654321 = 3^2 * 17^2 * 379721.
		

Crossrefs

Extensions

Definition corrected by Charles R Greathouse IV, Sep 20 2012
a(17)-a(24) and name corrected by Sean A. Irvine, Aug 17 2021
a(25)-a(27) from Daniel Suteu, Aug 18 2021

A053547 Smallest prime starting with A000422(n).

Original entry on oeis.org

11, 211, 3217, 432121, 543217, 65432117, 76543217, 876543211, 9876543211, 1098765432101, 11109876543211, 12111098765432101, 1312111098765432139, 141312111098765432113, 15141312111098765432173
Offset: 1

Views

Author

Enoch Haga, Jan 16 2000

Keywords

Examples

			a(6)=65432117 is smallest prime beginning with the string 654321.
		

Crossrefs

Cf. A000422.

Programs

  • Mathematica
    Flatten[Select[Join[10 #+Range[1,9,2],100 #+Range[1,99,2]],PrimeQ,1]&/@ Table[FromDigits[Flatten[IntegerDigits/@Range[n,1,-1]]],{n,25}]] (* Harvey P. Dale, Nov 04 2011 *)
  • Python
    from sympy import isprime
    def A053547(n):
        s = int(''.join(str(m) for m in range(n,0,-1)))
        for i in range(1,10):
            s *= 10
            for j in range(1,10**i,2):
                x = s+j
                if isprime(x):
                    return x
        else:
            return 'search limit reached.' # Chai Wah Wu, Jan 02 2015

A078568 Repunits concatenated with A000422, where A000422 is the concatenation of numbers from n down to 1.

Original entry on oeis.org

11, 1121, 111321, 11114321, 1111154321, 111111654321, 11111117654321, 1111111187654321, 111111111987654321, 111111111110987654321, 111111111111110987654321, 111111111111121110987654321
Offset: 1

Views

Author

Jason Earls, Nov 29 2002

Keywords

Comments

See A078569 for the primes arising in this sequence.

Crossrefs

Programs

  • Mathematica
    a[n_Integer] := Block[{repUn = Array[Array[1 &, #] &, {n}], nTo1 = Range[ Range@n, 1, -1]}, ToExpression/@ StringJoin/@ Map[ToString, Flatten/@ Thread@{repUn, nTo1}, {2}]]; a[100] (* or *)
    a[n_Integer] := FromDigits /@ StringJoin /@ Table[ Join[ PadLeft[{}, i, "1"], ToString /@ Range[i, 1, -1]], {i, n}]; a[100] (* Mikk Heidemaa, May 03 2021 *)
    Table[FromDigits[Join[PadRight[{},n,1],Flatten[IntegerDigits/@Range[n,1,-1]]]],{n,20}] (* Harvey P. Dale, Aug 23 2022 *)

A077185 a(n) = A000422(A077183(n))/prime(n).

Original entry on oeis.org

0, 7, 0, 3, 128465555544332211, 11647163162383665717, 58097313, 2859, 702235353091782071927, 149, 814268458452231668262948810358418956591, 5730248154490578733002999666333
Offset: 1

Views

Author

Amarnath Murthy, Nov 01 2002

Keywords

Examples

			a(4) = 3 = 21 /7.
		

Crossrefs

Programs

  • Maple
    a077183 := [0, 2, 0, 2, 14, 15, 9, 5, 16, 4, 25, 21, 40, 67, 78, 66, 25, 111, 161, 49, 30, 15, 27, 20, 63, 98, 102, 3, 99, 92, 296, 71, 22, 367, 4, 48, 50, 91, 45, 241, 137, 258, 23, 28, 212, 40, 96, 408, 456, 110] : A055642 := proc(n) floor(log[10](n))+1 ; end : A000422 := proc(n) local resul,i; resul := 0 ; for i from n to 1 by -1 do resul := 10^A055642(i)*resul+i ; od ; end: for n from 1 to nops(a077184) do if op(n,a077184) <> 0 then printf("%a, ",A000422(op(n,a077184))/ithprime(n)) ; else printf("%d, ",0) ; fi ; od ; # R. J. Mathar, Apr 01 2007

Extensions

Corrected and extended by R. J. Mathar, Apr 01 2007

A078207 a(n) = A078206(n) / A000422(n).

Original entry on oeis.org

1, 6, 384, 2856, 22727, 188679, 1612903, 14084506, 124999999, 112359549631, 1111234572418, 1019369022515831, 9409019496692991, 873646201597158837, 815363874644766139852, 76437144029054504848414, 719381682508917578872474, 679393593475575516018040602
Offset: 1

Views

Author

Amarnath Murthy, Nov 22 2002

Keywords

Examples

			a(3) = 384 = 123264/321.
		

Crossrefs

Cf. A078206.

Extensions

Edited and extended by Max Alekseyev, May 13 2009

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

A058183 Number of digits in concatenation of first n positive integers.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125
Offset: 1

Views

Author

Henry Bottomley, Nov 17 2000

Keywords

Comments

Or, total number of digits in numbers from 1 through n.

Examples

			a(12) = 15 since 123456789101112 has 15 digits.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) a(n):= `if`(n=0, 0, a(n-1) +length(n)) end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 26 2013
    a := proc(n) local d; d:=floor(log10(n))+1; (n+1)*d - (10^d-1)/9; end; # N. J. A. Sloane, Feb 20 2020
  • Mathematica
    Length/@ Flatten/@ IntegerDigits/@ Flatten/@ Rest[FoldList[List, {}, Range[70]]] (* Eric W. Weisstein, Nov 04 2015 *)
    Table[With[{d = IntegerLength[n]}, (n+1) d - (10^d -1)/9], {n, 70}] (* Eric W. Weisstein, Nov 06 2015 *)
    IntegerLength/@ FoldList[#2 + #1 10^IntegerLength[#2] &, Range[70]] (* Eric W. Weisstein, Nov 06 2015 *)
    Accumulate[ IntegerLength@ # & /@ Range @ 70] (* Robert G. Wilson v, Jul 31 2018 *)
  • PARI
    a(n)=my(t=log(10*n+.5)\log(10));n*t+t-10^t\9 \\ Charles R Greathouse IV, Sep 19 2012
    
  • PARI
    a(n) = sum(k=1, n, #digits(k)); \\ Michel Marcus, Jan 01 2017
    
  • Python
    def A058183(n): return (n+1)*(s:=len(str(n))) - (10**s-1)//9 # Chai Wah Wu, May 02 2023

Formula

a(n) = (n+1)*floor(log_10(10*n)) - (10^floor(log_10(10*n))-1)/(10-1).
a(n) = a(n-1) + floor(log_10(10*n)).
a(n) = A055642(A007908(n)).
a(n) = A055642(A053064(n)). - Reinhard Zumkeller, Oct 10 2008
a(n) ~ n log_10 n + O(n). In particular lim inf (n log_10 n - a(n))/n = (1+log(10/9)+log(log(10)))/log(10) and the corresponding lim sup is 10/9. - Charles R Greathouse IV, Sep 19 2012
G.f.: (1-x)^(-2)*Sum_{j>=0} x^(10^j). - Robert Israel, Nov 04 2015
a(n) = b(n)*(n + 1) - (10^b(n) - 19)/9 - 2, where b(n) = A055642(n). - Lorenzo Sauras Altuzarra, May 09 2020
a(n) = A055642(A000422(n)). - Michel Marcus, Sep 11 2021

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

A116504 Number of distinct prime divisors of the concatenation of n,...,1.

Original entry on oeis.org

0, 2, 2, 2, 3, 2, 2, 3, 3, 3, 2, 3, 3, 4, 5, 4, 6, 8, 4, 5, 4, 5, 4, 5, 6, 7, 5, 5, 7, 8, 3, 6, 5, 7, 8, 6, 4, 3, 6, 5, 8, 6, 3, 7, 6, 5, 7, 7, 3, 6, 3, 7, 9, 9, 3, 4, 4, 6, 3, 3, 5, 8, 5, 6, 7, 7, 4, 8, 8, 4, 8, 4, 7, 8, 10, 3, 7, 6, 4, 7, 7, 1, 3, 8, 3, 8, 5, 4, 5, 7, 11, 9, 6
Offset: 1

Views

Author

Parthasarathy Nambi, Mar 20 2006

Keywords

Examples

			87654321 = 3*3*1997*4877, distinct prime divisors are 3, 1997 and 4877, hence a(8) = 3.
		

Crossrefs

Programs

  • Mathematica
    b = {}; a = {}; Do[w = RealDigits[n]; w = First[w]; Do[PrependTo[a, w[[Length[w] - k + 1]]], {k, 1, Length[w]}]; p = FromDigits[a]; m = FactorInteger[p]; AppendTo[b, Length[m]], {n, 1, 30}]; b (* Artur Jasinski, Mar 30 2008 *)
    Table[PrimeNu[FromDigits[Flatten[IntegerDigits/@Range[n,1,-1]]]],{n,95}] (* Harvey P. Dale, Oct 03 2015 *)
  • PARI
    {a="";for(n=1,58,a=concat(n,a);print1(omega(eval(a)),","))}

Extensions

Edited and extended by Klaus Brockhaus, Mar 29 2006
Terms a(59)-a(93) from Sean A. Irvine, Nov 04 2009
a(90) corrected by Sean A. Irvine, Nov 02 2024
Previous Showing 11-20 of 72 results. Next