A355769 Numbers k such that both k and k+1 can be written as the sum of two nonzero squares.
17, 25, 40, 52, 72, 73, 89, 97, 100, 116, 136, 145, 148, 169, 180, 193, 225, 232, 233, 241, 244, 260, 288, 289, 292, 305, 313, 337, 369, 388, 400, 404, 409, 424, 449, 457, 481, 520, 521, 544, 548, 577, 584, 585, 592, 612, 625, 628, 640, 656, 673, 676, 697, 724
Offset: 1
Keywords
Examples
17 is a term since 17 = 4^2 + 1^2 and 17 + 1 = 18 = 3^2 + 3^2. 169 is a term since 169 = 5^2 + 12^2 and 169 + 1 = 170 = 1^2 + 13^2.
Programs
-
PARI
is1(n)= for( i=1, #n=factor(n)~%4, n[1, i]==3 && n[2, i]%2 && return); n && ( vecmin(n[1, ])==1 || (n[1, 1]==2 && n[2, 1]%2)); \\ A000404 isok(k) = is1(k) && is1(k+1); \\ Michel Marcus, Jul 18 2022
Comments