cp's OEIS Frontend

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.

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.

Original entry on oeis.org

9, 8, 27, 16, 45, 24, 63, 18, 25, 40, 99, 48, 117, 56, 135, 36, 153, 32, 171, 80, 189, 88, 207, 54, 49, 104, 75, 112, 261, 120, 279, 50, 297, 136, 315, 64, 333, 152, 351, 90, 369, 168, 387, 176, 125, 184, 423, 108, 81, 72, 459, 208, 477, 96, 495, 126, 513, 232
Offset: 1

Views

Author

Felix Huber, Jan 07 2025

Keywords

Examples

			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.
		

Crossrefs

Programs

  • Maple
    A379705:=proc(n)
       local d;
       d:=expand(NumberTheory:-LargestNthPower(n,2));
       if is(n*(1+(d+1)^2/d^2),even) then
          n*(d+1)^2/d^2
       else
          n*(d+2)^2/d^2
       fi;
    end proc;
    seq(A379705(n),n=1..58);

Formula

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.
a(n) = A072905(n) if n*(1+(A000188(n)+1)^2/A008833(n)) is even.