login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A255892 Primes p such that each decimal digit of p is equal to the difference of two other digits of p. 4
101, 10111, 10133, 10177, 10313, 10331, 10771, 11909, 13103, 14401, 16061, 17107, 20233, 20323, 20929, 22303, 23203, 29209, 30113, 30223, 30553, 30773, 31013, 32203, 34403, 35053, 37307, 38083, 38803, 40343, 40433, 40499, 40949, 43403, 44101, 44909, 47407 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Let x(1)x(2)...x(q-1)x(q) denote the decimal expansion of a prime number p. The sequence lists the primes p such that, for each index i, x(i) = x(u) - x(v) for some indices u and v.
Subsequence of A255966.
Each term of the sequence contains at least two identical decimal digits and at least one 0 digit.
The number 112345678909 is the smallest element of the sequence containing 10 distinct digits.
Number of terms < 10^n: 0, 0, 1, 1, 64, 1100, 20799, 340324, ... . - Robert G. Wilson v, Mar 10 2015
LINKS
EXAMPLE
101 is in the sequence because 1 = 1 - 0 and 0 = 1 - 1.
MAPLE
for n from 100 to 100000 do:
x:=convert(n, base, 10):n1:=nops(x):c:=0:T:=array(1..n1-1):
for nn from 1 to n1 do:
z:=x[nn]:
k:=0:
for j from 1 to n1 do:
if nn<>j
then
k:=k+1:T[k]:=x[j]:
else
fi:
od:
ii:=0:
for a from 1 to n1-1 while(ii=0) do:
for b from a+1 to n1-1 while(ii=0) do:
if z=abs(T[a]-T[b]) then ii:=1:c:=c+1:
else
fi:
od:od:
od:
if c=n1 and type(n, prime)=true then printf(`%d, `, n):
else
fi:
od:
MATHEMATICA
fQ[n_] := Block[{id = IntegerDigits@ n, lng = 1 + Floor@ Log10@ n}, Union@ Table[c = Complement[ Range@ lng, {i}]; MemberQ[ Union@ Flatten@ Table[ Abs[id[[j]] - id[[k]]], {j, c}, {k, c}], id[[i]]], {i, lng}] == {True}]; Select[ Prime@ Range@ 5000, fQ] (* Robert G. Wilson v, Mar 10 2015 *)
CROSSREFS
Sequence in context: A094028 A144564 A261965 * A065074 A113628 A135375
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Mar 09 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)