%I #20 May 04 2016 19:44:58
%S 13,3,68,182,5,32,191,333,73,70,1068,132,507,173,774,50,11,30,1553,
%T 3990,338,2307,246,2917,1228,80,14369,76,114,1590,2529,100,28,4952,82,
%U 659,948,7083,2190,8938,19,489,11393,1968,2941,21124,3549,1725,64,1382,2540
%N Least number k such that (k^2+1) mod s = prime(n) where s is the sum of the distinct primes dividing k^2+1, or 0 if no such k exists.
%C Conjecture: a(n)> 0 for all n > 0.
%C The primes in the sequence are 3, 5, 11, 13, 19, 29, 73, 173, 191,...
%C The squares in the sequence are 25, 64, 100,...
%e a(1)=13 because 13^2+1 = 170 = 2*5*17 => 170 mod(2+5+17) = 170 mod 24 = 2 = prime(1).
%t Table[k=0;While[Mod[k^2+1,Plus@@First[Transpose[FactorInteger[k^2+1]]]]!=Prime[n],k++];k, {n,50}]
%o (PARI) a(n) = {k = 1; while ((m=k^2+1) && (lift(Mod(m, vecsum(factor(m)[,1]))) != prime(n)) , k++); k;} \\ _Michel Marcus_, Apr 29 2016
%Y Cf. A005574, A193462, A262965.
%K nonn
%O 1,1
%A _Michel Lagneau_, Apr 28 2016
|