login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A032734 All 81 combinations of prefixing and following a(n) by a single digit are nonprime. 4
2437, 5620, 7358, 11111, 13308, 13332, 13650, 14612, 19737, 19817, 24217, 25213, 26302, 27971, 28472, 28838, 29289, 29542, 29650, 31328, 33027, 33170, 35914, 35970, 36186, 37977, 38327, 39127, 39608, 40078, 41165, 41528, 42422, 43277 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

EXAMPLE

2437 prefixed and followed with a pair of digits from (1,2,3,4,5,6,7,8,9) never yields a prime: '9'2437'1' = 7 x 37 x 43 x 83.

MAPLE

isA032734 := proc(n)

        for k from 1 to 9 do

        for k2 from 1 to 9 do

                dgs := [k, op(convert(n, base, 10)), k2] ;

                dgsn := add( op(i, dgs)*10^(i-1), i=1..nops(dgs)) ;

                if isprime(dgsn) then

                        return false;

                end if;

        end do:

        end do:

        return true;

end proc:

for n from 1 to 50000 do

        if isA032734(n) then

                printf("%d, ", n);

        end if;

end do: # R. J. Mathar, Oct 22 2011

MATHEMATICA

ok[n_] := With[{id = IntegerDigits[n]}, Select[ Flatten[ Table[ FromDigits[ Join[{j}, id, {k}]], {j, 1, 9}, {k, 1, 9}], 1], PrimeQ, 1] == {}]; A032734 = {}; n = 1; While[n < 50000, If[ok[n], Print[n]; AppendTo[A032734, n]]; n++]; A032734(* From Jean-François Alcover, Nov 23 2011 *)

PROG

(PARI) is_A032734(n)={p=10^#Str(n*=10); forstep(k=n+p, n+9*p, p, nextprime(k)>k+9|return); 1}  \\ - M. F. Hasler, Oct 22 2011

CROSSREFS

Cf. A032682-A032685 and A032702-A032733.

Sequence in context: A202201 A147984 A192767 * A083625 A183629 A035772

Adjacent sequences:  A032731 A032732 A032733 * A032735 A032736 A032737

KEYWORD

nonn,nice,base

AUTHOR

Patrick De Geest (pdg(AT)worldofnumbers.com), May 15 1998.

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 10:07 EST 2012. Contains 205904 sequences.