cp's OEIS Frontend

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.

A371948 Numbers k such that k+1 is composite and A371699(k) != p^2 where p = A020639(k+1) is the smallest prime factor of k+1.

This page as a plain text file.
%I A371948 #11 Apr 13 2024 23:17:15
%S A371948 288,298,340,360,376,516,526,550,582,736,778,792,802,816,892,988,1002,
%T A371948 1006,1072,1138,1146,1198,1206,1246,1270,1338,1342,1348,1356,1390,
%U A371948 1402,1456,1500,1516,1536,1576,1632,1642,1702,1726,1738,1750,1768,1816,1828,1842
%N A371948 Numbers k such that k+1 is composite and A371699(k) != p^2 where p = A020639(k+1) is the smallest prime factor of k+1.
%C A371948 If k+1 is composite, then A371699(k) <= A020639(k+1)^2. This sequence lists numbers k where the inequality is strict.
%H A371948 Chai Wah Wu, <a href="/A371948/b371948.txt">Table of n, a(n) for n = 1..10000</a>
%o A371948 (Python)
%o A371948 from itertools import count, islice
%o A371948 from sympy import isprime, primefactors, factorint, integer_log
%o A371948 def A371948_gen(startvalue=2): # generator of terms >= startvalue
%o A371948     for n in count(max(startvalue,2)):
%o A371948         if not isprime(n+1):
%o A371948             q = min(primefactors(n+1))
%o A371948             for m in range(4,q**2):
%o A371948                 f = factorint(m)
%o A371948                 if sum(f.values()) > 1:
%o A371948                     c = 0
%o A371948                     for p in sorted(f,reverse=True):
%o A371948                         a = pow(n,integer_log(p,n)[0]+1,m)
%o A371948                         for _ in range(f[p]):
%o A371948                             c = (c*a+p)%m
%o A371948                     if not c:
%o A371948                         yield n
%o A371948                         break
%o A371948 A371948_list = list(islice(A371948_gen(), 30))
%Y A371948 Cf. A020639, A027746, A259047, A322843, A248915, A371641, A371699, A371900.
%K A371948 nonn
%O A371948 1,1
%A A371948 _Chai Wah Wu_, Apr 13 2024