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.

A188836 Numbers n for which A188794(n)^2 = n.

Original entry on oeis.org

4, 9, 25, 49, 121, 169, 289, 361, 625, 841, 961, 1369, 1681, 1849, 3721, 4489, 5041, 5329, 7921, 9409, 10201, 10609, 11881, 12769, 16129, 17161, 18769, 19321, 22201, 22801, 24649, 32761, 36481, 37249, 38809, 39601, 44521, 52441, 57121, 58081, 63001, 73441
Offset: 1

Views

Author

Vladimir Shevelev, Apr 12 2011

Keywords

Comments

The sequence contains many squares of primes.
Question 1: What is the sequence of primes whose squares are not in this sequence? It begins: 23, 47, 53, 59, 79, 83, 107, ... A188833
Question 2: What is the sequence of composite numbers whose squares are in this sequence? It begins: 25, 289, 361, 529, ...

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n) local h, i, k, m;
           m, i:= 0, 0;
           for k from 2 to floor(sqrt(n)) do
              h:= nops(select(x-> irem(x, k)=0,
                      [seq (n-d, d=divisors(n-k) minus{1})]));
              if h>m then m, i:= h, k fi
           od; i
        end:
    a:= proc(n) option remember; local k;
          for k from 1+ `if` (n=1, 3, a(n-1))
          while not b(k)^2=k do od; k
        end:
    seq(a(n), n=1..15);  # Alois P. Heinz, Apr 13 2011
  • Mathematica
    b[n_] := Module[{h, i = 0, k, m = 0}, For[k = 2, k <= Floor[Sqrt[n]], k++, h = Length[Select[Table[n - d, {d, Rest[Divisors[n - k]]}], Mod[#, k] == 0 &]]; If[h > m, {m, i} = {h, k}]]; i];
    Reap[For[n = 1, n <= 80000, n++, If[b[n]^2==n, Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Nov 11 2020, after Alois P. Heinz *)