login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A353074
Numbers that differ from their prime neighbors by distinct squares.
1
140, 148, 182, 190, 242, 250, 284, 292, 338, 346, 410, 418, 422, 430, 548, 556, 578, 586, 632, 640, 692, 700, 710, 718, 788, 796, 812, 820, 830, 838, 891, 903, 920, 928, 1022, 1030, 1040, 1048, 1052, 1060, 1154, 1162, 1172, 1180, 1250, 1258, 1336, 1352, 1400
OFFSET
1,1
LINKS
EXAMPLE
Prime neighbors of 891 are 887 and 907, with different square differences 4 and 16. Thus, 891 is in this sequence.
MAPLE
q:= n-> (s-> nops(s)=2 and andmap(issqr, s))({n-prevprime(n), nextprime(n)-n}):
select(q, [$3..2000])[]; # Alois P. Heinz, Apr 22 2022
MATHEMATICA
Select[Range[3, 2000], IntegerQ[Sqrt[NextPrime[#] - #]] && IntegerQ[Sqrt[# - Prime[PrimePi[NextPrime[# - 1]] - 1]]] && NextPrime[#] - # != # - Prime[PrimePi[NextPrime[# - 1]] - 1] &]
PROG
(PARI) isok(k) = my(d, dd); (k>1) && issquare(nextprime(k+1)-k, &d) && issquare(k-precprime(k-1), &dd) && (d!=dd); \\ Michel Marcus, Apr 22 2022
CROSSREFS
Sequence in context: A252963 A114825 A308617 * A224982 A256085 A054573
KEYWORD
nonn
AUTHOR
Tanya Khovanova, Apr 21 2022
STATUS
approved