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.

A086171 Continued fraction of sum(prime(n)/10^b(n)), where b(n) = 1 + the total number of digits of the first n-1 primes, A068670.

Original entry on oeis.org

0, 4, 4, 6, 2, 5, 18, 1, 3, 4, 1, 2, 1, 2, 4, 7, 4, 1, 21, 2, 1, 3, 5, 2, 1, 1, 27, 1, 1, 5, 12, 1, 18, 1, 1, 1, 1, 1, 1, 9, 3, 1, 1, 1, 5, 1, 5, 2, 2, 1, 53, 1, 8, 1, 23, 6, 2, 2, 1, 1, 3, 1, 1, 25, 2, 2, 7, 1, 2, 3, 1, 4, 3, 12, 1, 2, 7, 1, 68, 1, 19, 1, 2, 2, 14, 4, 6, 2, 1, 2, 58, 2, 16, 1, 1, 1, 2, 2, 1
Offset: 1

Views

Author

Roger L. Bagula, Aug 26 2003

Keywords

Examples

			r=0.235811317192329313741434753596167717...
= 2/10^1 + 3/10^2 + 5/10^3 + 7/10^4 + 11/10^5 + 13/10^7 + ..., the exponents being increased by the length of the previous prime. - _M. F. Hasler_, Oct 17 2013
		

Programs

  • Mathematica
    (* number of powers of ten in the Primes as a sequence*) byte[n_Integer?Positive] := byte[n] =byte[n-1]+Floor[Log[Prime[n-1]]/Log[10]]+1 byte[0]=byte[1] = 1 b=Table[N[Prime[n]*10^(-byte[n]), Digits], {n, 1, Digits}] r=Apply[Plus, b]

Formula

r = sum_{n=1..infinity} prime(n)/10^b(n), where b(n+1)=b(n)+floor(log[10] prime(n))+1, b(1)=1. (Edited by M. F. Hasler, Oct 17 2013)

Extensions

Edited by M. F. Hasler, Oct 17 2013

A019518 Smarandache-Wellin numbers: a(n) is the concatenation of first n primes (written in base 10).

Original entry on oeis.org

2, 23, 235, 2357, 235711, 23571113, 2357111317, 235711131719, 23571113171923, 2357111317192329, 235711131719232931, 23571113171923293137, 2357111317192329313741, 235711131719232931374143, 23571113171923293137414347
Offset: 1

Views

Author

R. Muller

Keywords

Examples

			E.g. a(6) = 2_3_5_7_11_13 = 23571113.
		

References

  • R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 72. [The 2002 printing states incorrectly that a(719) is prime. Cf. A046035.] This book uses the name "Smarandache-Wellin numbers", referring to a 1998 private communication from P. Wellin.
  • H. Ibstedt, A Few Smarandache Sequences, Smarandache Notions Journal, Vol. 8, No. 1-2-3, 1997, 170-183.
  • M. Le, On Smarandache Concatenated Sequences I: Prime Power Sequences, Smarandache Notions Journal, Vol. 9, No. 1-2, 1998, 129-130.
  • S. Smarandoiu, Convergence of Smarandache continued fractions, Abstract 96T-11-195, Abstracts Amer. Math. Soc., 17 (No. 4, 1996), 680.

Crossrefs

For the primes in this sequence see A069151. For where the primes occur see A046035.
Cf. A000040, A038394, A046284, A068670 (number of digits).

Programs

  • Haskell
    a019518 n = a019518_list !! (n-1)
    a019518_list = map read $ scanl1 (++) $ map show a000040_list :: [Integer]
    -- Reinhard Zumkeller, Mar 03 2014
    
  • Magma
    [Seqint(Reverse(&cat[Reverse(Intseq(NthPrime(k))): k in [1..n]])): n in [1..20]]; // Vincenzo Librandi, Aug 23 2015
  • Mathematica
    ConsecutivePrimes[n_] := FromDigits[Flatten[IntegerDigits /@ Prime[Range[n]]]] (* Eric W. Weisstein *)
    Table[FromDigits[Flatten[IntegerDigits[Prime[Range[i]]]]],{i,15}] (* Jayanta Basu, May 30 2013 *)
  • PARI
    s="";for(n=1,30,print1(s=Str(s,prime(n))",")) \\ Cino Hilliard; simplified by M. F. Hasler, Oct 06 2013
    
  • PARI
    A019518(n)=eval(concat(concat([""],primes(n)))) \\ Faster than concat(apply(s->Str(s),primes(n))) or forprime(...s=Str(s,p)). - M. F. Hasler, Oct 06 2013
    

Extensions

Definition edited by N. J. A. Sloane, Jul 02 2017

A033308 Decimal expansion of Copeland-Erdős constant: concatenate primes.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The number .23571113171923.... was proved normal in base 10 by Copeland and Erdős but is not known to be normal in other bases. - Jeffrey Shallit, Mar 14 2008
Could be read (with indices 1, 2, ...) as irregular table whose n-th row lists the A097944(n) digits of the n-th prime A000040(n). - M. F. Hasler, Oct 25 2019
Named after the American mathematician Arthur Herbert Copeland (1898-1970) and the Hungarian mathematician Paul Erdős (1913-1996). - Amiram Eldar, May 29 2021
This constant is irrational but it is not (yet) known to be transcendental. - Charles R Greathouse IV, Feb 03 2025

Examples

			0.235711131719232931374143475359616771737983899710110310710911312...
		

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Section 6.9, p. 442.
  • Glyn Harman, One hundred years of normal numbers, in M. A. Bennett et al., eds., Number Theory for the Millennium, II (Urbana, IL, 2000), A K Peters, Natick, MA, 2002, pp. 149-166.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 60.

Crossrefs

Cf. A030168 (continued fraction), A072754 (numerators of convergents), A072755 (denominators of convergents).
Cf. A000040 (primes), A097944 (row lengths if this is read as table), A228355 (digits of the primes listed in reversed order).
Cf. A033307 (Champernowne constant: analog for positive integers instead of primes), A007376 (digits of the integers, considered as infinite word or table), A066716 (decimals of the binary Champernowne constant).
Cf. A066747 and A191232: binary Copeland-Erdős constant: decimals and binary digits.
See also A338072.

Programs

  • Haskell
    a033308 n = a033308_list !! (n-1)
    a033308_list = concatMap (map (read . return) . show) a000040_list :: [Int]
    -- Reinhard Zumkeller, Mar 03 2014
  • Mathematica
    N[Sum[Prime[n]*10^-(n + Sum[Floor[Log[10, Prime[k]]], {k, 1, n}]), {n, 1, 40}], 100] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Aug 12 2006 *)
    N[Sum[Prime@n*10^-(n + Sum[Floor[Log[10, Prime@k]], {k, n}]), {n, 45}], 106] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Aug 12 2006 *)
    IntegerDigits //@ Prime@Range@45 // Flatten (* Robert G. Wilson v Oct 03 2006 *)
  • PARI
    default(realprecision, 2080); x=0.0; m=-1; forprime (p=2, 4000, n=1+floor(log(p)/log(10)); x=p+x*10^n; m+=n; ); x=x/10^m; for (n=0, 2000, d=floor(x); x=(x-d)*10; write("b033308.txt", n, " ", d)); \\ Harry J. Smith, Apr 30 2009
    
  • PARI
    concat( apply( {row(n)=digits(prime(n))},  [1..99] )) \\ Yields this sequence; row(n) then yields the digits of prime(n) = n-th row of the table, cf. comments. - M. F. Hasler, Oct 25 2019
    

Formula

Equals Sum_{n>=1} prime(n)*10^(-A068670(n)). - Joseph Biberstine (jrbibers(AT)indiana.edu), Aug 12 2006
Equals Sum_{i>=1} (p_i * 10^(-(Sum_{j=1..i} 1 + floor(log_10(p_j))) )) or Sum_{i>=1} (p_i * 10^(-( i + Sum_{j=1..i} floor(log_10(p_j))) )) or Sum_{i>=1} (p_i * 10^(-( Sum_{j=1..i} ceiling(log_10(1 + p_j))) )). - Daniel Forgues, Mar 26-28 2014

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

A097944 Number of digits in n-th prime.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 1

Views

Author

Cino Hilliard, Sep 05 2004

Keywords

Comments

For primes p <= n sum(a(n)) -> n/2 and n-> inf.

Examples

			The first 4 primes are 2,3,5,7. These are 1-digit numbers so the first 4 entries in the table are 1's.
		

Crossrefs

Cf. A060417, A068670 (partial sums).

Programs

Formula

a(n) = (log n + log log n)/(log 10) + O(1).
a(n) = A055642(A000040(n)). - Reinhard Zumkeller, Apr 08 2012
a(n) = A068670(n) - A068670(n-1). - M. F. Hasler, Oct 24 2019

A121242 Number of 2's in first n primes.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 7, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24
Offset: 1

Views

Author

Zak Seidov, Aug 22 2006

Keywords

Comments

In the first 10^m (m=3,4,5) primes there are 339, 4070, 55213 2's, among all 3803, 48982, 610484 digits, which gives the frequencies {0.08914, 0.08309, 0.09044}.

Crossrefs

Cf. A068670 Number of digits in the first n primes.
Partial sums of A085976.

Programs

  • Maple
    ListTools:-PartialSums([seq(numboccur(2,convert(ithprime(i),base,10)),i=1..100)]); # Robert Israel, Jun 13 2018
  • Mathematica
    Accumulate[DigitCount[Prime[Range[90]],10,2]] (* Harvey P. Dale, Nov 09 2013 *)

A155498 Number of odd digits in the concatenation of first n primes.

Original entry on oeis.org

0, 1, 2, 3, 5, 7, 9, 11, 12, 13, 15, 17, 18, 19, 20, 22, 24, 25, 26, 28, 30, 32, 33, 34, 36, 38, 40, 42, 44, 47, 49, 52, 55, 58, 60, 63, 66, 68, 70, 73, 76, 78, 81, 84, 87, 90, 92, 93, 94, 95, 97, 99, 100, 102, 104, 105, 106, 108, 110, 111, 112, 114, 116, 119, 122, 125, 128
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 23 2009

Keywords

Comments

Partial sums of A104638. [R. J. Mathar, Feb 13 2009]

Examples

			If n=1, concatenate first 1 prime = 2, then number of odd digits = 0 = a(1).
If n=2, concatenate first 2 primes = 23, then number of odd digits = 1 = a(2).
If n=3, concatenate first 3 primes = 235, then number of odd digits = 2 = a(3).
		

Crossrefs

Programs

Extensions

Replaced 53 by 55. R. J. Mathar, Feb 13 2009

A278959 Length of the string that is generated by the concatenation of all the prime numbers < n (where n >= 0).

Original entry on oeis.org

0, 0, 0, 1, 2, 2, 3, 3, 4, 4, 4, 4, 6, 6, 8, 8, 8, 8, 10, 10, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14, 16, 16, 18, 18, 18, 18, 18, 18, 20, 20, 20, 20, 22, 22, 24, 24, 24, 24, 26, 26, 26, 26, 26, 26, 28, 28, 28, 28, 28, 28, 30
Offset: 0

Views

Author

Indranil Ghosh, Dec 02 2016

Keywords

Comments

In the following Python program, the algorithm based on the sieve of Eratosthenes is used to generate the primes.

Examples

			For n=15, the primes < n are 2,3,5,7,11,13. So the concatenated string is "23571113", which has length=8. a(n)=8.
		

Crossrefs

Programs

  • Mathematica
    Join[{0},Accumulate[Table[If[PrimeQ[n],IntegerLength[n],0],{n,0,60}]]] (* Harvey P. Dale, Mar 04 2023 *)
  • Python
    def p(n):
        if n<=2:
            return 0
        s=1
        l = [True] * n
        for i in range(3,int(n**0.5)+1,2):
            if l[i]:
                l[i*i::2*i]=[False]*((n-i*i-1)//(2*i)+1)
        for i in range(3,n,2):
                if l[i]:
                    s+=len(str(i))
        return s
    for i in range(0, 100001):
        print(f'{i} {p(i)}')

A304652 Digits of the Copeland-Erdős constant taken in groups of five digits.

Original entry on oeis.org

23571, 35711, 57111, 71113, 11131, 11317, 13171, 31719, 17192, 71923, 19232, 92329, 23293, 32931, 29313, 93137, 31374, 13741, 37414, 74143, 41434, 14347, 43475, 34753, 47535, 75359, 53596, 35961, 59616, 96167, 61677, 16771, 67717, 77173, 71737, 17379, 73798, 37983, 79838, 98389
Offset: 1

Views

Author

Alonso del Arte, May 16 2018

Keywords

Comments

This sequence is presented by the Foo Bar Challenge, a recruitment tool for Google, as the challenge to renumber some entities with 5-digit ID numbers taken from the first 10004 places of the Copeland-Erdős constant.
The ID numbers are to be left zero-padded as needed to ensure they all consist of five digits. Of course here in the OEIS leading zeros will just be dropped.
The Foo Bar Challenge statement of the problem says nothing of the fact that there are duplicates among these well before 10000.

Crossrefs

Programs

  • Mathematica
    numCopelandErdos = Flatten[IntegerDigits[Prime[Range[1000]]]]; Table[FromDigits[numCopelandErdos[[n ;; (n + 4)]]], {n, Length[numCopelandErdos] - 4}]

A306890 a(n) is the number of prime digits used in writing out all primes up to and including the n-th prime.

Original entry on oeis.org

1, 2, 3, 4, 4, 5, 6, 6, 8, 9, 10, 12, 12, 13, 14, 16, 17, 17, 18, 19, 21, 22, 23, 23, 24, 24, 25, 26, 26, 27, 29, 30, 32, 33, 33, 34, 36, 37, 38, 40, 41, 41, 41, 42, 43, 43, 44, 47, 50, 52, 55, 57, 58, 60, 63, 65, 66, 68, 71, 72, 74, 76, 78, 79
Offset: 1

Views

Author

Lekraj Beedassy, Mar 15 2019

Keywords

Examples

			We have a(10) = 9 since all primes up to the 10th (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) use the 9 prime digits 2, 3, 5, 7, 3, 7, 2, 3, 2.
		

Crossrefs

Partial sums of A109066. Cf. A068670.

Programs

Showing 1-10 of 10 results.