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.

User: Gerry Myerson

Gerry Myerson's wiki page.

Gerry Myerson has authored 4 sequences.

A132188 Number of 3-term geometric progressions with no term exceeding n.

Original entry on oeis.org

1, 2, 3, 6, 7, 8, 9, 12, 17, 18, 19, 22, 23, 24, 25, 32, 33, 38, 39, 42, 43, 44, 45, 48, 57, 58, 63, 66, 67, 68, 69, 76, 77, 78, 79, 90, 91, 92, 93, 96, 97, 98, 99, 102, 107, 108, 109, 116, 129, 138, 139, 142, 143, 148, 149, 152, 153, 154, 155, 158
Offset: 1

Author

Gerry Myerson, Nov 21 2007

Keywords

Comments

a(n) = number of pairs (i,j) in [1..n] X [1..n] with integral geometric mean sqrt(i*j). Cf. A000982, A362931. - N. J. A. Sloane, Aug 28 2023
Also the number of 2 X 2 symmetric singular matrices with entries from {1, ..., n} - cf. A064368.
Rephrased: Number of ordered triples (w,x,y) with all terms in {1,...,n} and w^2=x*y. See A211422. - Clark Kimberling, Apr 14 2012

Examples

			a(4) counts these six (w,x,y) - triples: (1,1,1), (2,1,4), (2,4,1), (2,2,2), (3,3,3), (4,4,4). - _Clark Kimberling_, Apr 14 2012
		

Crossrefs

Programs

  • Haskell
    a132188 0 = 0
    a132188 n = a132345 n + (a120486 $ fromInteger n)
    -- Reinhard Zumkeller, Apr 21 2012
    
  • Maple
    a:= proc(n) option remember; `if`(n=0, 0, a(n-1)+
          1+2*add(`if`(issqr(i*n), 1, 0), i=1..n-1))
        end:
    seq(a(n), n=1..60);  # Alois P. Heinz, Aug 28 2023
  • Mathematica
    t[n_] := t[n] = Flatten[Table[w^2 - x*y, {w, 1, n}, {x, 1, n}, {y, 1, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 0, 80}]  (* Clark Kimberling, Apr 14 2012 *)
  • Python
    from sympy.ntheory.primetest import is_square
    def A132188(n): return n+(sum(1 for x in range(1,n+1) for y in range(1,x) if is_square(x*y))<<1) # Chai Wah Wu, Aug 28 2023

Formula

a(n) = Sum [sqrt(n/k)]^2, where the sum is over all squarefree k not exceeding n.
If we call A120486, this sequence and A132189 F(n), P(n) and S(n), respectively, then P(n) = 2 F(n) - n = S(n) + n. The Finch-Sebah paper cited at A000188 proves that F(n) is asymptotic to (3 / pi^2) n log n. In the reference, we prove that F(n) = (3 / pi^2) n log n + O(n), from which it follows that P(n) = (6 / pi^2) n log n + O(n) and similarly for S(n).
a(n) = Sum_{1 <=x,y <=n} A010052(x*y). - Clark Kimberling, Apr 14 2012
a(n) = n+2*Sum_{1<=xA010052(x*y). - Chai Wah Wu, Aug 28 2023

A132189 Number of non-constant 3-term geometric progressions with no term exceeding n.

Original entry on oeis.org

0, 0, 0, 2, 2, 2, 2, 4, 8, 8, 8, 10, 10, 10, 10, 16, 16, 20, 20, 22, 22, 22, 22, 24, 32, 32, 36, 38, 38, 38, 38, 44, 44, 44, 44, 54, 54, 54, 54, 56, 56, 56, 56, 58, 62, 62, 62, 68, 80, 88, 88, 90, 90, 94, 94, 96, 96, 96, 96, 98, 98, 98, 102, 116, 116, 116, 116, 118, 118, 118
Offset: 1

Author

Gerry Myerson, Nov 21 2007

Keywords

Comments

In racetrack language, this is the number of trifectas in geometric progression in an n-horse race.
It appears that geometric progression like (k,0,0) are excluded. - Stefan Steinerberger, Nov 24 2007

Crossrefs

Cf. A132345.

Programs

  • Mathematica
    a = {}; For[n = 1, n < 80, n++, c = 0; For[j = 1, j < n + 1, j++, For[h = 1, h < n + 1, h++, If[Not[h == j], If[IntegerQ[j*(h/j)^2], If[j*(h/j)^2 < n + 1, c++ ]]]]]; AppendTo[a, c]]; a (* Stefan Steinerberger, Nov 24 2007 *)

Formula

a(n) = 2 * A132345(n). - Alois P. Heinz, Jun 08 2025

Extensions

More terms from Stefan Steinerberger, Nov 24 2007

A120486 Partial sums of A000188.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 8, 10, 13, 14, 15, 17, 18, 19, 20, 24, 25, 28, 29, 31, 32, 33, 34, 36, 41, 42, 45, 47, 48, 49, 50, 54, 55, 56, 57, 63, 64, 65, 66, 68, 69, 70, 71, 73, 76, 77, 78, 82, 89, 94, 95, 97, 98, 101, 102, 104, 105, 106, 107, 109, 110, 111, 114, 122, 123, 124, 125, 127, 128
Offset: 1

Author

Gerry Myerson, Nov 21 2007

Keywords

Comments

This sequence can also be described as the number of 3-term nondecreasing geometric progressions with no term exceeding n.
a(n) = A132188(n) - A132345(n). - Reinhard Zumkeller, Apr 21 2012

Crossrefs

Programs

  • Haskell
    a120486 n = a120486_list !! (n - 1)
    a120486_list = scanl1 (+) a000188_list
    -- Reinhard Zumkeller, Apr 22 2012
  • Maple
    with(numtheory): seq(add(phi(k)*floor(n/k^2), k=1..floor(sqrt(n))), n=1..100); # Ridouane Oudra, Aug 18 2019

Formula

a(n) = 3n log(n) / Pi^2 + O(n). - Griffin N. Macris, Jan 28 2017
a(n) ~ 3*n*((log(n) + (3*gamma - 1))/ Pi^2 - 12*(Zeta'(2)/Pi^4)), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jan 30 2019
a(n) = Sum_{k=1..floor(sqrt(n))} phi(k)*floor(n/k^2), where phi is the Euler totient function A000010. - Ridouane Oudra, Aug 18 2019
G.f.: (1/(1 - x)) * Sum_{k>=1} phi(k) * x^(k^2) / (1 - x^(k^2)). - Ilya Gutkovskiy, Aug 26 2021
From Ridouane Oudra, Oct 05 2024: (Start)
a(n) = Sum_{i=1..n} Sum_{j=1..i} A010052(i*j).
a(n) = A132345(n) + n.
a(n) = (1/2)*A132189(n) + n.
a(n) = (1/2)*(A132188(n) + n). (End)

A096381 Beginning with 2, 7, multiply successive pairs of members and adjoin the result as the next one or two members of the sequence, depending on whether the product is a one- or two-digit number.

Original entry on oeis.org

2, 7, 1, 4, 7, 4, 2, 8, 2, 8, 8, 1, 6, 1, 6, 1, 6, 6, 4, 8, 6, 6, 6, 6, 6, 3, 6, 2, 4, 3, 2, 4, 8, 3, 6, 3, 6, 3, 6, 3, 6, 1, 8, 1, 8, 1, 2, 8, 1, 2, 6, 8, 3, 2, 2, 4, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 6, 8, 8, 8, 8, 2, 1, 6, 8, 2, 1, 2, 4, 8, 2, 4, 6, 4, 8, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 8
Offset: 1

Author

Gerry Myerson, Aug 04 2004

Keywords

Comments

Berzsenyi sets the puzzle of showing that 6 occurs infinitely often in the sequence. It is easy to compose variations on the sequence, e.g., vary a(1) and a(2), or use a base other than 10, or use the product of three successive members instead of 2.

Examples

			a(1)a(2) = 14, so a(3) = 1 and a(4) = 4.
		

References

  • George Berzsenyi, Competition Corner problem 468, The Mathematics Student (published by NCTM), Vol. 26, No. 2, November 1978.
  • Loren C. Larson, Problem-Solving Through Problems, Springer, 1983, page 8, Problem 1.1.6.

Programs

  • Haskell
    a=2:7:concat[(if x*y>9then[x*y`div`10]else[])++[x*y`mod`10]|(x,y)<-a`zip`tail a] -- Paul Stoeber (pstoeber(AT)uni-potsdam.de), Oct 08 2005
    
  • Maple
    R:= 2,7: count:= 2:
    for i from 1 while count < 200 do
      t:= R[i]*R[i+1];
      if t >= 10 then R:= R, floor(t/10),t mod 10; count:= count+2 else R:= R, t;
    count:= count+1 fi;
    od:
    R; # Robert Israel, Jan 16 2018
  • Mathematica
    Fold[Join[#, IntegerDigits[Times @@ #[[#2;;#2+1]]]] &, {2, 7}, Range[100]] (* Paolo Xausa, Aug 17 2025 *)
  • Python
    from itertools import islice
    from collections import deque
    def agen(): # generator of terms
        a = deque([2, 7])
        while True:
            a.extend(list(map(int, str(a[0]*a[1]))))
            yield a.popleft()
    print(list(islice(agen(), 105))) # Michael S. Branicky, Aug 18 2025

Extensions

Corrected by Robert Israel, Jan 16 2018