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 31-40 of 84 results. Next

A190480 Concatenation of first n digits in the concatenation of first n primes written in base 2.

Original entry on oeis.org

1, 10, 101, 1011, 10111, 101110, 1011101, 10111011, 101110111, 1011101111, 10111011111, 101110111110, 1011101111101, 10111011111011, 101110111110111, 1011101111101111, 10111011111011110, 101110111110111101, 1011101111101111011
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 24 2011

Keywords

Comments

The terms are 1, 2, 5, 11, 23, 46, 93, 185, 375, ... in decimal.
The terms are the first n digits of the concatenation 10//11//101//111//1011//1101//.. generated with A004676.

Crossrefs

Cf. A019518.

Programs

  • Mathematica
    With[{cc=Flatten[Table[IntegerDigits[p,2],{p,Prime[ Range[ 10]]}]]},Table[ FromDigits[Take[cc,n]],{n,Length[cc]}]] (* Harvey P. Dale, Jan 26 2021 *)

A103208 Numbers k such that 3 divides prime(1) + ... + prime(k).

Original entry on oeis.org

10, 16, 18, 20, 24, 26, 28, 30, 32, 34, 36, 40, 42, 44, 46, 52, 54, 57, 68, 70, 74, 76, 78, 80, 82, 84, 86, 88, 90, 97, 99, 103, 105, 107, 111, 113, 119, 121, 123, 125, 127, 129, 134, 136, 138, 161, 163, 166, 169, 175, 177, 179, 185, 187, 195, 197, 199, 203, 205, 207, 211, 213
Offset: 1

Views

Author

Robert G. Wilson v, Mar 19 2005

Keywords

Comments

Also, numbers k such that 3 divides the concatenation of the first k primes (see A019518).
The first comment and the description are true whenever the number of primes congruent to 1 mod 6 exceeds the number of primes congruent to 5 mod 6 and the difference is congruent to 1 mod 3 or the number of primes congruent to 5 mod 6 exceeds the number of primes congruent to 1 mod 6 and the difference is congruent to 2 mod 3. - Roderick MacPhee, Oct 30 2015

Crossrefs

Programs

  • Maple
    s1:=[2]; M:=1000; for n from 2 to M do s1:=[op(s1),s1[n-1]+ithprime(n)]; od: s1;
    f:=proc(k) global M,s1; local t1,n; t1:=[]; for n from 1 to M do if s1[n] mod k = 0 then t1:=[op(t1),n]; fi; od: t1; end; f(3);
  • Mathematica
    f[n_] := FromDigits[ Flatten[ Table[ IntegerDigits[ Prime[i]], {i, n}]]]; Select[ Range[ 206], Mod[f[ # ], 3] == 0 &]
    Flatten[Position[Accumulate[Prime[Range[250]]],?(Divisible[#,3]&)]] (* _Harvey P. Dale, Jan 14 2016 *)
  • PARI
    a=0;b=0;for(x=3,1000,if(prime(x)%6==1,a+=1,b+=1);if((a-b)%3==1 || (b-a)%3==2,print1(x","))) \\ Roderick MacPhee, Oct 30 2015
    
  • PARI
    lista(nn) = { s=0; for(k=1, nn, s += prime(k); if(s % 3 == 0, print1(k, ", ")););} \\ Altug Alkan, Dec 04 2015

Extensions

Entry revised by N. J. A. Sloane, Nov 09 2005

A069151 Concatenations of consecutive primes, starting with 2, that are also prime.

Original entry on oeis.org

2, 23, 2357
Offset: 1

Views

Author

Joseph L. Pe, Apr 08 2002

Keywords

Comments

Primes in A019518.
The next term is the 355-digit number 2357111317192329313741434753...677683691701709719 which is too large to include here. See A046035, A046284.
The term after the 355-digit term has 499 digits, and the next two terms after that have 1171 and 1543 digits respectively. - Harvey P. Dale, Oct 03 2024

References

  • R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, 2nd ed., Springer, NY, 2005; see p. 78. [The 2002 printing states incorrectly that 2357...5441 is prime.]

Crossrefs

Cf. A019518.
Cf. A046035 (Numbers n such that the concatenation of the first n primes is prime)
Cf. A046284 (Primes p such that concatenation of primes from 2 through p is a prime).
Cf. A030997 (Smallest prime which is a concatenation of n consecutive primes).

Programs

  • Mathematica
    Cases[FromDigits /@ Rest[FoldList[Join, {}, IntegerDigits[Prime[ Range[10^3]]]]], ?PrimeQ] (* _Eric W. Weisstein, Oct 30 2015 *)
    Select[Table[FromDigits[Flatten[IntegerDigits/@Prime[Range[n]]]],{n,500}],PrimeQ] (* Harvey P. Dale, Oct 03 2024 *)
  • PARI
    s=""; for(n=1, 200, s=concat(s, prime(n)); if(ispseudoprime( eval(s)), print1(s", "))) \\ Jens Kruse Andersen, Jun 26 2014
    
  • Python
    from sympy import isprime, nextprime
    def afind(terms, verbose=False):
      n, p, pstr = 0, 2, "2"
      while n < terms:
        if isprime(int(pstr)): n += 1; print(n, int(pstr))
        p = nextprime(p); pstr += str(p)
    afind(5) # Michael S. Branicky, Feb 23 2021

Extensions

Edited by Robert G. Wilson v, Apr 11 2002
Entry revised Jan 18 2004

A091762 Last n digits of concatenation of first n primes.

Original entry on oeis.org

2, 23, 235, 2357, 35711, 571113, 7111317, 11131719, 113171923, 1317192329, 31719232931, 171923293137, 7192329313741, 19232931374143, 923293137414347, 2329313741434753, 32931374143475359, 293137414347535961, 9313741434753596167, 31374143475359616771, 137414347535961677173, 3741434753596167717379
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 04 2004

Keywords

Comments

a(n) = A019518(n) mod 10^n; a(n) mod 10^A055642(A000040(n)) = A000040(n); for the primes in this sequence see A091763.

Examples

			The first 5 primes are 2, 3, 5, 7, 11. The last 5 digits concatenated are 35711 so a(5) = 35711. - _David A. Corneth_, Sep 15 2019
		

Programs

  • Mathematica
    Table[FromDigits[Take[Flatten[IntegerDigits/@Prime[Range[n]]],-n]],{n,20}] (* Harvey P. Dale, Sep 15 2019 *)
  • PARI
    a(n) = {my(p = prime(n), v = digits(p)); while(#v < n, p = precprime(p - 1); v = concat(digits(p), v)); fromdigits(vector(n, i, v[#v - n + i]))} \\ David A. Corneth, Sep 15 2019

Extensions

More terms from David A. Corneth, Sep 15 2019

A068670 Number of digits in the concatenation of first n primes.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 49, 52, 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, 85, 88, 91, 94, 97, 100, 103, 106, 109, 112, 115, 118, 121, 124, 127, 130, 133, 136, 139, 142, 145, 148, 151, 154
Offset: 0

Views

Author

Eugene McDonnell (eemcd(AT)mac.com), Jan 18 2004

Keywords

Comments

Partial sums of A097944. - Lekraj Beedassy, Aug 26 2008

Examples

			a(5) is 6 because concatenating the first five primes gives 235711, which has six digits.
		

Crossrefs

Cf. A019518, A097944 (number of decimal digits of the primes).
Cf. A033308 (decimal expansion of the Copeland-Erdos constant).

Programs

  • Magma
    a068670:=func< n | n + &+[ Floor(Log(10, NthPrime(k))): k in [1..n] ] >; [ a068670(n): n in [1..70] ];
    
  • Mathematica
    Table[n + Sum[Floor[Log[10, Prime[k]]], {k, 1, n}], {n, 1, 90}] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Aug 12 2006 *)
    Accumulate[IntegerLength[Prime[Range[70]]]] (* Harvey P. Dale, Jul 01 2012 *)
  • PARI
    A68670=List(0); A068670(n)={for(N=#A68670,n, listput(A68670, A68670[N] + A097944(N))); A68670[n+1]} \\ M. F. Hasler, Oct 24 2019
    
  • Python
    from sympy import sieve
    from itertools import accumulate, chain
    def f(, n): return  + len(str(n))
    def agen(): yield from accumulate(chain((0,), (p for p in sieve)), f)
    print(list(islice(agen(), 62))) # Michael S. Branicky, Feb 03 2023

Formula

a(n) = Sum_{i=1..n} ceiling(log_10(1 + prime(i))). - Daniel Forgues, Apr 02 2014

Extensions

Extended to a(0) = 0 by M. F. Hasler, Oct 24 2019

A089933 Concatenate the first n odd primes.

Original entry on oeis.org

3, 35, 357, 35711, 3571113, 357111317, 35711131719, 3571113171923, 357111317192329, 35711131719232931, 3571113171923293137, 357111317192329313741, 35711131719232931374143, 3571113171923293137414347, 357111317192329313741434753, 35711131719232931374143475359
Offset: 1

Views

Author

Cino Hilliard, Jan 11 2004

Keywords

Comments

Except for a(1) = 3, these numbers are not prime for n < 10000. See A089948.

Crossrefs

Programs

  • Magma
    [Seqint(Reverse(&cat[Reverse(Intseq(NthPrime(k+1))): k in [1..n]])): n in [1..17]]; // Vincenzo Librandi, Nov 30 2015
  • Maple
    a[1]:= 3;
    for n from 2 to 100 do
      p:= ithprime(n+1);
      a[n]:= 10^(1+ilog10(p))*a[n-1]+p
    od:
    seq(a[i],i=1..100); # Robert Israel, Aug 25 2016
  • Mathematica
    Table[FromDigits[Flatten[IntegerDigits[Prime[Range[n] + 1]]]],{n, 20}] (* Vincenzo Librandi, Nov 30 2015 *)
  • PARI
    concatprime(n) = { y=""; forprime(x=3,n, y=concat(Str(y),Str(x)); z=eval(y); print1(z",") ) }
    

Extensions

Offset changed by Robert Israel, Aug 25 2016

A046284 Primes p such that concatenation of primes from 2 through p is a prime.

Original entry on oeis.org

2, 3, 7, 719, 1033, 2297, 3037, 11927
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Comments

"w_n = (P_1)(P_2) ... (P_n) [A019518], by which notation we mean that w_n is constructed in decimal by simple concatenation of digits [much like the Almost Natural numbers (A007376)]. For example, the first few w_n are 2, 23, 235, 2357, 235711, ... ." - Crandall and Pomerance

Examples

			7 is a member, since 2357 is a prime.
		

References

  • R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 72. [The 2002 printing states incorrectly that 5441 is a term.]

Crossrefs

Cf. A019518, A033308, A069151. a(n) = prime(A046035(n)).

Programs

  • Mathematica
    a = ""; Do[a = StringJoin[a, ToString[ Prime[n]]]; If[ PrimeQ[ ToExpression[a]], Print[n]], {n, 1, 1429}]

Extensions

Additional comments from Robert G. Wilson v, Sep 10 2001

A171154 Smallest prime whose decimal expansion begins with concatenation of first n primes in descending order.

Original entry on oeis.org

2, 3203, 5323, 75323, 11753221, 131175329, 171311753203, 19171311753229, 231917131175321, 292319171311753231, 3129231917131175327, 3731292319171311753239, 41373129231917131175321, 43413731292319171311753233, 4743413731292319171311753269, 534743413731292319171311753223
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Dec 04 2009

Keywords

Comments

Sequence is conjectured to be infinite.
a(n) = "prime(n)...prime(1) R(n)".
R(n) for n>1: 03, 3, 3, 21, 9, 03, 29, 1, 31, 7, 39, 1, 33, 69, 23, 3, 59, 27, ...
It is conjectured that R(n)=1 for infinite many n.

Examples

			a(1) = 2 = prime(1) is the exceptional case, because no R(1).
a(2) = 3203 = prime(453) = "32 03", R(2)="03".
a(5) = 11753221 = prime(772902) = "prime(5)...prime(1) 21", R(5)=21.
		

References

  • Leonard E. Dickson, History of the Theory of numbers, vol. I, Dover Publications 2005.

Crossrefs

Programs

  • Python
    from sympy import isprime, primerange, prime
    def a(n):
        if n == 1: return 2
        c = int("".join(map(str, [p for p in primerange(2, prime(n)+1)][::-1])))
        pow10 = 10
        while True:
            c *= 10
            for b in range(1, pow10, 2):
                if b%5 == 0: continue
                if isprime(c+b):
                    return c+b
            pow10 *= 10
    print([a(n) for n in range(1, 17)]) # Michael S. Branicky, Mar 12 2022

Extensions

a(14) and beyond from Michael S. Branicky, Mar 12 2022

A038394 Concatenate first n primes in reverse order.

Original entry on oeis.org

2, 32, 532, 7532, 117532, 13117532, 1713117532, 191713117532, 23191713117532, 2923191713117532, 312923191713117532, 37312923191713117532, 4137312923191713117532, 434137312923191713117532, 47434137312923191713117532, 5347434137312923191713117532
Offset: 1

Views

Author

M. I. Petrescu (mipetrescu(AT)yahoo.com)

Keywords

References

  • F. Smarandache, Sequences of Numbers Involved in Unsolved Problems, Hexis, Phoenix, 2006.

Crossrefs

Programs

  • Haskell
    a038394 n = a038394_list !! (n-1)
    a038394_list = f "" a000040_list where
       f xs (q:qs) = (read ys :: Integer) : f ys qs
         where ys = show q ++ xs
    -- Reinhard Zumkeller, Mar 03 2014
    
  • Mathematica
    Join[{s = 2}, Table[s = FromDigits[Flatten[IntegerDigits[{Prime[n], s}]]], {n, 2, 13}]] (* Jayanta Basu, Jul 14 2013 *)
  • PARI
    a(n) = fromdigits(concat([digits(p) | p<-Vecrev(primes(n))])); \\ Andrew Howroyd, Aug 29 2020

Extensions

Offset corrected by Reinhard Zumkeller, Mar 03 2014

A038395 Concatenation of the first n odd numbers in reverse order.

Original entry on oeis.org

1, 31, 531, 7531, 97531, 1197531, 131197531, 15131197531, 1715131197531, 191715131197531, 21191715131197531, 2321191715131197531, 252321191715131197531, 27252321191715131197531, 2927252321191715131197531, 312927252321191715131197531
Offset: 1

Views

Author

M. I. Petrescu (mipetrescu(AT)yahoo.com)

Keywords

Comments

a(n) starts with the digits of 2n-1. Indices of prime or probable prime terms are 1,2,37,62,409,...: see also A089922. - M. F. Hasler, Apr 13 2008
If n == 0 (mod 3), so is a(n). - Sergey Pavlov, Mar 29 2017

References

  • Mihaly Bencze [Beneze] and L. Tutescu, Some Notions and Questions in Number Theory, Sequence 3.

Crossrefs

Programs

  • Mathematica
    Table[FromDigits[Flatten[IntegerDigits/@Join[Reverse[Range[1,n,2]]]]], {n,1,29,2}] (* Harvey P. Dale, Jun 02 2011 *)
  • PARI
    t=""; for( n=1,10^3, ( t=eval( Str( 2*n-1,t))) & print(n" "t)) \\ M. F. Hasler, Apr 13 2008
    
  • Python
    def a(n): return int("".join(map(str, range(2*n-1, 0, -2))))
    print([a(n) for n in range(1, 17)]) # Michael S. Branicky, Jan 31 2021

Extensions

Edited and extended by M. F. Hasler, Apr 13 2008
Edited by T. D. Noe, Oct 30 2008
Previous Showing 31-40 of 84 results. Next