OFFSET
1,2
COMMENTS
The corresponding prime numbers are A344384.
64 is the first number of least prime signature not in this sequence.
Questions: 1) Is this sequence infinite? 2) Is log(a(n)) = O(log(n)^2)? For the first 132 terms, log(a(n)) is fit unusually well by a quadratic polynomial in log(n).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..132 from Hal M. Switkay)
EXAMPLE
16 is a term because 16 is in A025487 and 16 + 1 is prime.
MATHEMATICA
(* Load the function f[n] at A025487, then: *)
Select[Union@ Flatten@ f[6], AnyTrue[# + {-1, 1}, PrimeQ] &]
(* or use the b-file at A025487: *)
Select[TakeWhile[Import["https://oeis.org/A025487/b025487.txt", "Data"], Length@ # == 2 &][[All, -1]], AnyTrue[# + {-1, 1}, PrimeQ] &] (* Michael De Vlieger, May 16 2021 *)
PROG
(Python)
from itertools import islice
from heapq import heappop, heappush
from sympy import isprime, factorint, prevprime, nextprime
def A344385_gen(): # generator of terms
h, hset = [1], {1}
while True:
m = heappop(h)
if isprime(m-1) or isprime(m+1):
yield m
ps = factorint(m)
for p in ps:
if p == 2 or ps[prevprime(p)]>ps[p]:
mp = m*p
if mp not in hset:
heappush(h, mp)
hset.add(mp)
mp = m*nextprime(max(ps.keys(), default=1))
if mp not in hset:
heappush(h, mp)
hset.add(mp)
CROSSREFS
KEYWORD
nonn
AUTHOR
Hal M. Switkay, May 16 2021
STATUS
approved
