This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A379705 #5 Jan 17 2025 19:38:36 %S A379705 9,8,27,16,45,24,63,18,25,40,99,48,117,56,135,36,153,32,171,80,189,88, %T A379705 207,54,49,104,75,112,261,120,279,50,297,136,315,64,333,152,351,90, %U A379705 369,168,387,176,125,184,423,108,81,72,459,208,477,96,495,126,513,232 %N A379705 a(n) is the least integer k > n such that integers p, q exist for which n, p, k are in arithmetic and n, q, k are in geometric progression. %H A379705 Felix Huber, <a href="/A379705/b379705.txt">Table of n, a(n) for n = 1..10000</a> %H A379705 Wikipedia, <a href="https://en.wikipedia.org/wiki/Arithmetic_progression">Arithmetic Progression</a> %H A379705 Wikipedia, <a href="https://en.wikipedia.org/wiki/Geometric_progression">Geometric Progression</a> %F A379705 a(n) = n/A008833(n)*(A000188(n) + k)^2, where k = 1 if n*(1+(A000188(n)+1)^2/A008833(n)) is even or k = 2 else. %F A379705 a(n) = A072905(n) if n*(1+(A000188(n)+1)^2/A008833(n)) is even. %e A379705 a(9) = 25 because 9, 17, 25 are in arithmetic progression (common difference = 8) and 9, +-15, 25 are in geometric progression (common ratio = +-5/3) and there is no other integer k with 9 < k < 25 such that integers p and q exist for which 9, p, k are in arithmetic and 9, q, k are in geometric progression. %p A379705 A379705:=proc(n) %p A379705 local d; %p A379705 d:=expand(NumberTheory:-LargestNthPower(n,2)); %p A379705 if is(n*(1+(d+1)^2/d^2),even) then %p A379705 n*(d+1)^2/d^2 %p A379705 else %p A379705 n*(d+2)^2/d^2 %p A379705 fi; %p A379705 end proc; %p A379705 seq(A379705(n),n=1..58); %Y A379705 Cf. A000188, A008833, A057918, A072905, A379663. %K A379705 nonn %O A379705 1,1 %A A379705 _Felix Huber_, Jan 07 2025