A134406 Composite numbers of the form k^2 + 1.
10, 26, 50, 65, 82, 122, 145, 170, 226, 290, 325, 362, 442, 485, 530, 626, 730, 785, 842, 901, 962, 1025, 1090, 1157, 1226, 1370, 1445, 1522, 1682, 1765, 1850, 1937, 2026, 2117, 2210, 2305, 2402, 2501, 2602, 2705, 2810, 3026, 3250, 3365, 3482, 3601, 3722, 3845
Offset: 1
Keywords
Examples
10 is a term because 10 = 3^2 + 1 is composite, 26 is a term because 26 = 5^2 + 1 is composite, 50 is a term because 50 = 7^2 + 1 is composite.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
ts_fn1:=proc(n) local i,tren,ans; ans:=[ ]: for i from 1 to n do tren := i^(2)+1: if (isprime(tren) = false) then ans:=[ op(ans), tren ]: fi od: RETURN(ans) end: ts_fn1(200);
-
Mathematica
Select[Range[70]^2+1,!PrimeQ[#]&] (* Harvey P. Dale, Aug 12 2012 *)
-
PARI
for(n=3,99, if(!isprime(t=n^2+1), print1(t", "))) \\ Charles R Greathouse IV, Aug 29 2016
-
Python
from sympy import isprime from itertools import count, takewhile def aupto(limit): form = takewhile(lambda x: x <= limit, (k**2+1 for k in count(1))) return [number for number in form if not isprime(number)] print(aupto(3845)) # Michael S. Branicky, Oct 26 2021
Formula
a(n) = 1 + A134407(n)^2. - R. J. Mathar, Oct 13 2019
Comments