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.

A382306 a(n) is the number of values m that satisfy floor(sqrt(m))=n and A382286(m)=1.

Original entry on oeis.org

3, 2, 1, 3, 5, 4, 2, 1, 3, 5, 7, 6, 4, 2, 1, 3, 5, 7, 9, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 13, 12, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 13, 15, 14, 12, 10, 8, 6, 4, 2, 1, 3, 5, 7, 9, 11, 13, 15, 17, 16, 14, 12, 10, 8, 6, 4, 2, 1
Offset: 1

Views

Author

Hassan Baloui, Mar 21 2025

Keywords

Comments

The sequence is quasiperiodic with quasiperiod 2*n+1.
The partial sum of the sequence up to N behaves like 2*N^(3/2)/3 for N large enough.

Examples

			a(1)=3 since C(1)=C(2)=C(3)=0.
a(2)=2 because C(4)..C(8) = 0,1,1,0,1 and only two arguments satisfy C(m)=0.
a(3)=1 because C(9)..C(15) = 0,1,2,1,2,1,1 and only one argument satisfies C(m)=0.
a(4)=3 since C(16)..C(24) = 0,3,1,3,0,1,2,3,0 and only three arguments satisfying C(m)=0.
		

Crossrefs

Programs

  • PARI
    d(n) = if(n<2, 1, my(d=divisors(n)); d[(length(d)+1)\2]); \\ A033676
    f(n) = my(k=1); while (sqrtint(n*k/d(n*k)) != sqrtint(d(n*k)), k++); k; \\ A382286
    a(n) = #select(x->f(x)==1, [n^2..n^2+2*n]); \\ Michel Marcus, Mar 21 2025

Formula

Let C(m) = floor(sqrt(A033677(m))) - floor(sqrt(A033676(m))), then
a(n) = |{m: n^2 <= m <= n^2+2*n and C(m)=0}|.
a(n^2)=3.
a(1)=3; a(2)=2; a(3)=1.
a(n^2+m) = 3+2*m for m=0..n-1.
a(n^2+n+m) = 2*(n-m) for m=0..n-1.
a(n^2+2*n) = 1.