OFFSET
1,1
COMMENTS
From first 100 terms, in 65 cases a(n) = 7*n. In general, a(n) <= 7*n.
From Robert Israel, Jul 07 2017: (Start)
For any p in A042999, a(n) == 0 (mod p) if and only if n == 0 (mod p), with a(p*k) = p*a(k).
Thus if n = m*r where all prime factors of m are in A042999, a(n) = m*a(r).
In particular, if all prime factors of n are in A042999, then a(n) = 7*n.
Conjecture: this is "if and only if".
(End)
Alternatively: A306236(n) is the smallest integer m > n with integer j > m that makes n^2, m^2 and j^2 an arithmetic progression. This is the sequence of j. - Jinyuan Wang, Feb 09 2019.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1)=7: (1^2 + 7^2)/2 = 5^2;
a(7)=17: (7^2 + 17^2)/2 = 5^2.
MAPLE
f:= proc(n) local m; for m from n+2 by 2 do if issqr((n^2+m^2)/2) then return m fi od end proc:
map(f, [$1..100]); # Robert Israel, Jul 07 2017
MATHEMATICA
n=0; Table[n++; m=n+1; While[!IntegerQ[Sqrt[(n^2+m^2)/2]], m++]; m, {100}]
PROG
(PARI) a(n) = my(m=n+1); while(!issquare((n^2+m^2)/2), m++); m; \\ Michel Marcus, Jul 07 2017
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Zak Seidov, Jul 05 2017
STATUS
approved