This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A293425 #25 Apr 22 2025 05:08:39 %S A293425 29,59,89,149,179,239,269,359,449,479,599,719,809,1439,1499,1619,2399, %T A293425 2699,2879,2999,4049,4799,5399,7499,8999,9719,10799,11519,12149,12959, %U A293425 13499,15359,18749,20249,21599,23039,25919,33749,35999,40499,51839,56249,59999,65609,67499,69119,71999 %N A293425 Primes of the form 2^a * 3^b * 5^c - 1 for positive a, b, c. %C A293425 a(n) is congruent to 29 (mod 30). %H A293425 Robert Israel, <a href="/A293425/b293425.txt">Table of n, a(n) for n = 1..10000</a> %e A293425 a(1) = 29 = 2^1 * 3^1 * 5^1 - 1. %e A293425 a(2) = 59 = 2^2 * 3^1 * 5^1 - 1. %e A293425 a(3) = 89 = 2^1 * 3^2 * 5^1 - 1. %e A293425 a(4) = 149 = 2^1 * 3^1 * 5^2 - 1. %e A293425 a(5) = 179 = 2^2 * 3^2 * 5^1 - 1. %e A293425 list of (a, b, c): (1, 1, 1), (2, 1, 1), (1, 2, 1), (1, 1, 2), (2, 2, 1), (4, 1, 1), (1, 3, 1), (3, 2, 1), (1, 2, 2), (5, 1, 1), (3, 1, 2), (4, 2, 1), (1, 4, 1), (5, 2, 1), (2, 1, 3), (2, 4, 1), ... %p A293425 N:= 10^6: # to get all terms < N %p A293425 R:= {}: %p A293425 for c from 1 to floor(log[5]((N+1)/6)) do %p A293425 for b from 1 to floor(log[3]((N+1)/2/5^c)) do %p A293425 R:= R union select(isprime, {seq(2^a*3^b*5^c-1, %p A293425 a=1..ilog2((N+1)/(3^b*5^c)))}) %p A293425 od od: %p A293425 sort(convert(R,list)); # _Robert Israel_, Oct 15 2017 %t A293425 With[{n = 10^5}, Sort@ Select[Flatten@ Table[2^a*3^b*5^c - 1, {a, Log2@ n}, {b, Log[3, n/(2^a)]}, {c, Log[5, n/(2^a*3^b)]}], PrimeQ]] (* _Michael De Vlieger_, Oct 11 2017 *) %o A293425 (GAP) K:=10^5+1;; # to get all terms <= K. %o A293425 A:=Filtered([1..K],IsPrime);; %o A293425 A293425:=List(Positions(List(A,i->Elements(Factors(i+1))),[2,3,5]),i->A[i]); %o A293425 (PARI) lista(nn) = {forprime(p=2,nn, f = factor(p+1); if ((vecmax(f[,1]) <= 5) && (#f~==3), print1(p, ", ")););} \\ _Michel Marcus_, Oct 09 2017 %o A293425 (Python) %o A293425 from itertools import count, islice %o A293425 from sympy import integer_log, isprime %o A293425 def A293425_gen(): # generator of terms %o A293425 def bisection(f,kmin=0,kmax=1): %o A293425 while f(kmax) > kmax: kmax <<= 1 %o A293425 kmin = kmax >> 1 %o A293425 while kmax-kmin > 1: %o A293425 kmid = kmax+kmin>>1 %o A293425 if f(kmid) <= kmid: %o A293425 kmax = kmid %o A293425 else: %o A293425 kmin = kmid %o A293425 return kmax %o A293425 def f(x): %o A293425 c = x %o A293425 for i in range(1,integer_log(x,5)[0]+1): %o A293425 for j in range(1,integer_log(m:=x//5**i,3)[0]+1): %o A293425 c -= (m//3**j).bit_length()-1 %o A293425 return c %o A293425 yield from filter(isprime,(bisection(lambda k:n+f(k),n,n)-1 for n in count(1))) %o A293425 A293425_list = list(islice(A293425_gen(),30)) # _Chai Wah Wu_, Mar 31 2025 %Y A293425 Cf. A000040, A005105, A030433, A132236, A293194. %K A293425 nonn %O A293425 1,1 %A A293425 _Muniru A Asiru_, Oct 09 2017