A248919 "Stubborn primes" (see comments in A232210).
13, 131, 653, 883, 1279, 10739, 17669
Offset: 1
Links
- Vladimir Shevelev, "Stubborn primes"
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.
5413 = 541*10 + 3, 3 appended to 541.
Select[Prime@ Range@ 630, PrimeQ[(# - 3)/10] &] (* Michael De Vlieger, Jul 14 2017 *)
lista(nn) = {forprime(p=2, nn, if (isprime(q=10*p+3), print1(q, ", ")););} \\ Michel Marcus, Oct 20 2014
For n<=3, a(n) = 0, because 3..32, 3..33 and 3..35 can never be prime, whatever the number of 3's that are concatenated. For n=4, prime(n)=7, 37 is prime. So a(4)=1.
a(n) = {if (n<=3, return (0)); p = prime(n); k = 1; while (! isprime(p = eval(concat("3", Str(p)))), k++); k; } \\ Michel Marcus, Sep 17 2014
a(n) = {k = 0; while (! isprime(eval(concat(Str(2^n), Str((10^k-1)/3)))), k++); k;} \\ Michel Marcus, Sep 16 2014
2^0=1 and already 31 is prime. So a(0)=1; 2^1=2, but odd part of 32 is 1 (nonprime); then consider odd part of 332. It is 83 that is prime. So a(1)=2.
f:= proc(n) local m,d,k,x; m:= 2^n; d:=ilog10(m); for k from 1 do x:= (10^k-1)/3*10^(d+1)+m; if isprime(x/2^padic:-ordp(x,2)) then return k fi od end proc: map(f, [$0..100]); # Robert Israel, Oct 30 2016
a(n) = {k = 0; while (! ((val = eval(concat(Str((10^k-1)/3), Str(2^n)))) && isprime(val/2^valuation(val, 2))), k++); k;} \\ Michel Marcus, Sep 15 2014
f[n_] := Block[{k = 1, p = Prime[n]}, While[ !PrimeQ[p*10^k + (10^k - 1)/9], k++]; k]; f[12] = 0; Array[f, 100]
f[n_] := Block[{k = 1, p = Prime[n]}, While[ !PrimeQ[p*10^k + 7(10^k - 1)/9], k++]; k]; f[4] = 0; Array[f, 100]
isok(k, dp) = ispseudoprime(fromdigits(concat(dp, vector(k, i, 7)))); a(n) = {if (prime(n) == 7, return(0)); my(k=1, p=prime(n)); while (!ispseudoprime(p*10^k+7*(10^k-1)/9), k++); k;} \\ Michel Marcus, Jan 20 2021
f[n_] := Block[{k = 1, p = Prime[n]}, While[ !PrimeQ[p*10^k + 10^k - 1], k++]; k]; f[2] = 0; Array[f, 86]
Select[Prime[Range[400]],NoneTrue[{10#+3,10#+9,3*10^IntegerLength[#]+#, 9*10^IntegerLength[ #]+#},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 06 2020 *)
lista(nn) = {forprime(p=2, nn, if (!isprime(eval(concat(Str(p), Str(3)))) && ! isprime(eval(concat(Str(p), Str(9)))) && ! isprime(eval(concat(Str(3), Str(p)))) && ! isprime(eval(concat(Str(9), Str(p)))), print1(p, ", ")););} \\ Michel Marcus, Sep 14 2014
import sympy from sympy import isprime from sympy import prime for n in range(1,10**3): p = str(prime(n)) if not isprime(int(p+'3')) and not isprime(int(p+'9')) and not isprime(int('3'+p)) and not isprime(int('9'+p)): print(int(p),end=', ') # Derek Orr, Sep 16 2014
Comments