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.

A365248 Composite numbers k that are not a prime minus one, for which A214749(k) = k/2.

This page as a plain text file.
%I A365248 #24 Oct 07 2023 11:23:46
%S A365248 34,94,118,142,202,214,246,274,298,334,394,402,436,454,514,526,538,
%T A365248 622,628,634,694,706,712,754,766,778,802,814,892,898,922,934,942,958,
%U A365248 1002,1006,1042,1054,1114,1126,1132,1138,1146,1158,1174,1198,1234,1246,1270
%N A365248 Composite numbers k that are not a prime minus one, for which A214749(k) = k/2.
%C A365248 As can be seen from A214749, for most composites k that are not a prime minus one, the smallest value of m that satisfies k-m | k^2+m is smaller than k/2. This sequence lists the exceptions.
%H A365248 Chai Wah Wu, <a href="/A365248/b365248.txt">Table of n, a(n) for n = 1..10000</a>
%o A365248 (Python)
%o A365248 from sympy import isprime
%o A365248 a=[]
%o A365248 for n in range(2,1000):
%o A365248   for m in range(1,n//2+1):
%o A365248    if (n**2+m)%(n-m)==0:
%o A365248     if m==n/2 and not isprime(n+1):
%o A365248      a.append(n)
%o A365248     break
%o A365248 print(a)
%o A365248 (Python)
%o A365248 from itertools import count, islice
%o A365248 from sympy import isprime
%o A365248 from sympy.abc import x, y
%o A365248 from sympy.solvers.diophantine.diophantine import diop_quadratic
%o A365248 def A365248_gen(startvalue=2): # generator of terms >= startvalue
%o A365248     return filter(lambda n:not isprime(n+1) and min(int(x) for x,y in diop_quadratic(n*(n-y)+x*(y+1)) if x>0)==n>>1, count(max(startvalue+startvalue&1,2),2))
%o A365248 A365248_list = list(islice(A365248_gen(),30)) # _Chai Wah Wu_, Oct 06 2023
%o A365248 (PARI) f(n) = my(m=1); while((n^2+m) % (n-m), m++); m; \\ A214749
%o A365248 lista(nn) = my(list=List()); forcomposite(c=1, nn, if ((f(c) == c/2) && !isprime(c+1), listput(list, c))); Vec(list);  \\ _Michel Marcus_, Sep 08 2023
%Y A365248 Cf. A214749, A365249.
%K A365248 nonn
%O A365248 1,1
%A A365248 _Bob Andriesse_, Aug 28 2023