OFFSET
1,1
COMMENTS
Carmichael numbers that are the sum of two distinct nonzero squares.
29341 is the first term for which neither of the squares can be the square of a prime.
Carmichael numbers that are not the sum of two squares start 561, 1729, 2821, 6601, 8911, 15841, ...
A Carmichael number m is a sum of two squares if and only if p == 1 (mod m) for every prime p|m. Observation, numerically checked by Amiram Eldar: the first 13 terms of this sequence are odd composites m such that m | EulerNumber(m-1) (A122045). - Thomas Ordowski, Mar 01 2020
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
G. Tarry, I. Franel, A. Korselt, and G. Vacca. Problème chinois. L'intermédiaire des mathématiciens 6 (1899), pp. 142-144.
Eric Weisstein's World of Mathematics, Carmichael Number
EXAMPLE
1105 is a term because 1105 = 23^2 + 24^2.
2465 is a term because 2465 = 41^2 + 28^2.
10585 is a term because 10585 = 37^2 + 96^2.
MATHEMATICA
t = Cases[Range[1, 10^7, 2], n_ /; Mod[n, CarmichaelLambda@ n] == 1 && ! PrimeQ@ n]; Select[t, SquaresR[2, #] > 0 &] (* Michael De Vlieger, Dec 06 2015, after Artur Jasinski at A002997 *)
PROG
(PARI) is(n)=if(n<5, return(0)); my(f=factor(n)%4); if(vecmin(f[, 1])>1, return(0)); for(i=1, #f[, 1], if(f[i, 1]==3 && f[i, 2]%2, return(0))); 1
is_c(n)={my(f); bittest(n, 0) && !for(i=1, #f=factor(n)~, (f[2, i]==1 && n%(f[1, i]-1)==1)||return) && #f>1}
for(n=1, 1e7, if(is(n)&&is_c(n), print1(n, ", ")))
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Dec 06 2015
STATUS
approved