A151796 Erroneous version of A074721.
2, 3, 5, 7, 11, 13, 17, 19, 23, 2, 93137414347535961677173798389971011031071091131, 271, 31, 13, 7, 13, 91491511, 571, 631, 67, 17, 3, 17, 9181, 19, 11, 9319, 7, 19
Offset: 1
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.
0.235711131719232931374143475359616771737983899710110310710911312...
a033308 n = a033308_list !! (n-1) a033308_list = concatMap (map (read . return) . show) a000040_list :: [Int] -- Reinhard Zumkeller, Mar 03 2014
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 *)
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
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
The proper initial segments of 499 are 4 and 49, none of which are primes. So 499 is a term of the sequence.
import Data.List (inits) a069090 n = a069090_list !! (n-1) a069090_list = filter (all (== 0) . map (a010051 . read) . init . tail . inits . show) a000040_list -- Reinhard Zumkeller, Mar 11 2014
isA069090 := proc(n) local dgs,l ; if isprime(n) then dgs := convert(n,base,10) ; ndgs := nops(dgs) ; for l from 1 to ndgs-1 do add( op(ndgs+i-l+1,dgs)*10^i,i=0..l-1) ; if isprime(%) then return false; end if; end do: true ; else false ; end if; end proc: for n from 2 to 830 do if isA069090(n) then printf("%d,",n); end if; end do: # R. J. Mathar, Dec 15 2016
Select[Prime[Range[200]],NoneTrue[FromDigits/@Table[Take[ IntegerDigits[ #], n],{n,IntegerLength[#]-1}],PrimeQ]&] (* The program uses the NoneTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 24 2016 *)
ina(n)=if(!isprime(n),return(0));while(n>9,n\=10;if(isprime(n),return(0)));1 \\ Franklin T. Adams-Watters, Jun 26 2009
from sympy import primerange, isprime def ok(p): s = str(p) if len(s) == 1: return True return all(not isprime(int(s[:i])) for i in range(1, len(s))) def aupto(lim): alst = [] for p in primerange(1, lim+1): if ok(p): alst.append(p) return alst print(aupto(829)) # Michael S. Branicky, Jul 03 2021
a(4)=1 because this is the first number not in the sequence whose first digit is 3 (last digit of a(3)), concatenated with its first digit 1, is prime: 31. a(14)=31 because this is the first number not in the sequence whose first digit is 2 (last digit of a(13)), concatenated with its first digit 3, is prime: 23.
from sympy import isprime from itertools import count, islice def agen(): # generator of terms aset, k, mink = {0}, 0, 1; yield 0 for n in count(2): k, prevdig = mink, str(k%10) while k in aset or not isprime(int(prevdig+str(k)[0])): k += 1 aset.add(k); yield k while mink in aset: mink += 1 print(list(islice(agen(), 64))) # Michael S. Branicky, Jun 09 2022
Comments