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.

A236454 Smallest number not dividing n^2.

Original entry on oeis.org

2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 7, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2
Offset: 1

Views

Author

Antti Karttunen, Jan 26 2014

Keywords

Comments

Differs from A053669, "smallest prime not dividing n", for the first time at n=210, where a(210)=8, while A053669(210)=11. A235921 lists all n for which a(n) differs from A053669(n).
Differs from A214720 at n=2, 210, 630, 1050, 1470, 1890, 2310,.... - R. J. Mathar, Mar 30 2014

Crossrefs

One more than A235918.

Programs

  • Maple
    A236454 := proc(n)
        for m from 2 do
            if modp(n^2,m) <> 0 then
                return m;
            end if;
        end do:
    end proc:# R. J. Mathar, Mar 30 2014
  • Mathematica
    Join[{2,3},Table[Complement[Range[n],Divisors[n^2]][[1]],{n,3,90}]] (* Harvey P. Dale, Mar 18 2018 *)
  • Scheme
    (define (A236454 n) (A007978 (A000290 n)))

Formula

a(n) = A007978(A000290(n)) = A007978(n^2).
a(n) = A235918(n)+1.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=0} 1/A019554(A003418(k)) = 2.91240643793540602415... . - Amiram Eldar, Jan 14 2024