OFFSET
1,1
COMMENTS
The old definition was that a(n) must be composite and "cannot be prefixed or followed by any digit to form a prime ('empty' suffixes are allowed)".
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
55553 prefixed with a digit from (1,2,3,4,5,6,7,8,9) and followed by a digit from ('',1,3,7,9) never yields a prime: '3'55553'_' = 11 x 32323; '2'5620'9' = 3 x 41 x 2083.
MAPLE
# Naive program to test for membership - N. J. A. Sloane, Jan 01 2025:
isA032737 := proc(x) local S, y, L1, L2, i, j;
L1:=[seq(i, i=1..9)]; L2:=[1, 3, 7, 9];
S:=[x];
for i in L1 do y:=parse(cat(i, x)); S:=[op(S), y]; od:
for i in L1 do for j in L2 do y:=parse(cat(i, x, j)); S:=[op(S), y]; od: od:
for i in S do if isprime(i) then return('false', i, "is prime"); break; fi; od:
'true';
end;
MATHEMATICA
pfdQ[n_]:=CompositeQ[n]&&NoneTrue[Flatten[Table[10(d1*10^IntegerLength[n]+n)+d2, {d1, Range[9]}, {d2, {1, 3, 7, 9}}]], PrimeQ] && NoneTrue[ Flatten[Table[d1*10^IntegerLength[n]+n, {d1, Range[9]}]], PrimeQ]; Select[Range[61000], pfdQ] (* Harvey P. Dale, Jan 01 2025 *)
CROSSREFS
KEYWORD
nonn,base,changed
AUTHOR
Patrick De Geest, May 15 1998
EXTENSIONS
Offset changed by Andrew Howroyd, Aug 13 2024
Definition revised by N. J. A. Sloane, Jan 01 2025
Terms corrected and extended by Harvey P. Dale, Jan 01 2025
STATUS
approved