OFFSET
1,2
COMMENTS
A014442(n) gives the largest prime factor of n^2 + 1.
The primes of the sequence are 3, 7, 47, 157, 1303, 3323, 46349, ...
The corresponding sequence Gpf(a(n)^2+1) is 2, 5, 5, 17, 17, 29, 37, 37, 101, 101, 101, 101, 101, 101, 101, 101, 101, 97, 97, 97, 97, 401, 349, 389, 557, 557, 557, 557, 557, 421, 421, 421, 557, ... and it is interesting to observe the frequency of repetitions for the numbers 5, 17, 37, 97, 101, 557, ...
EXAMPLE
a(3) = 7 because gpf(7^2 + 1) = gpf(3^2 + 1) = gpf(2^2 + 1) = 5 => 3 occurrences.
a(4) = 38 because gpf(38^2 + 1) = gpf(21^2 + 1) = gpf(13^2 + 1) = gpf(4^2 + 1) = 17 => 4 occurrences.
MAPLE
with(numtheory):nn:=70000:T:=array(1..nn):k:=0:kk:=1:
for m from 1 to nn do:
x:=factorset(m^2+1):n1:=nops(x):p:=x[n1]:k:=k+1:T[k]:=p:
od:
for n from 1 to 43 do:jj:=0:for k from kk to nn while(jj=0) do:
q:=T[k]:ii:=0:jj:=0:
for i from 1 to k do:
if T[i]=q then ii:=ii+1:
else
fi:
od:if ii=n then jj:=1:kk:=k:
printf ( "%d %d \n", n, k):else fi:
od:od:
PROG
(PARI) gpf(n) = my(f=factor(n^2+1)); f[#f~, 1];
nboc(k) = my(gpfk = gpf(k)); sum(i=1, k, gpf(i) == gpfk);
a(n) = my(k = 1); while (nbo(k) != n, k++); k; \\ Michel Marcus, Jun 12 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jun 12 2015
STATUS
approved