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: Hassan Baloui

Hassan Baloui's wiki page.

Hassan Baloui has authored 4 sequences.

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

Original entry on oeis.org

0, 3, 4, 2, 0, 2, 6, 8, 5, 3, 0, 3, 7, 10, 11, 9, 7, 2, 0, 2, 8, 12, 13, 15, 12, 10, 8, 3, 0, 3, 8, 11, 16, 19, 18, 16, 13, 11, 7, 3, 0, 2, 7, 11, 16, 18, 24, 22, 21, 17, 12, 12, 8, 3, 0, 3, 7, 13, 15, 18, 25, 24, 28, 22, 21, 18, 13, 11, 7, 3, 0, 3, 6, 11, 16, 20, 23, 27, 29, 30
Offset: 1

Author

Hassan Baloui, Apr 16 2025

Keywords

Comments

The sequence is quasiperiodic with quasiperiod 2*n + 1.
Conjecture: Sum_{n=1..N} a(n) ~ 4*N^(3/2)/3 for N large enough.
Conjecture: Sum_{n=1..N} a(n) ~ 2*Sum_{n=1..N} A382306(n) for N large enough.

Examples

			a(1) = 0 because C(1) = 5, C(2) = 4, C(3) = 4.
a(2) = 3 because C(4)..C(8) = 2,1,2,1,1 and only three arguments satisfy C(m) = 1.
a(3) = 4 because C(9)..C(15) = 2,1,4,1,4,1,1 and only four arguments satisfies C(m) = 1.
a(4) = 2 because C(16)..C(24) = 5,9,1,9,3,1,2,9,3 and only two 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)) != 1, k++); k; \\ A381054
    a(n) = #select(x->f(x)==1, [n^2..n^2+2*n]);

Formula

a(n) = |{m: n^2 <= m <= n^2+2*n and C(m)=1}| where C(m) = floor(sqrt(A033677(m))) - floor(sqrt(A033676(m))).

A381054 a(n) is the least k such that floor(sqrt(n*k/d(n*k))) - floor(sqrt(d(n*k))) = 1, where d(k) is the largest divisor of k which is <= sqrt(k).

Original entry on oeis.org

5, 4, 4, 2, 1, 2, 1, 1, 2, 1, 4, 1, 4, 1, 1, 5, 9, 1, 9, 3, 1, 2, 9, 3, 2, 2, 2, 3, 16, 2, 16, 3, 2, 5, 2, 2, 25, 5, 2, 2, 25, 2, 25, 1, 1, 5, 25, 2, 2, 1, 3, 1, 36, 1, 1, 2, 3, 8, 36, 1, 36, 8, 1, 3, 1, 1, 49, 3, 3, 1, 49, 1, 49, 13, 1, 3, 1, 1, 49, 1
Offset: 1

Author

Hassan Baloui, Apr 14 2025

Keywords

Comments

In the case of semiprime numbers n=p*q, the sequence a(n) choses the first two multiples of the prime factors p and q such that there is exactly one square between these multiples (say k*p, m*q) then a(n)=m*k.
In the case of any composite number n, for each pair of conjugate divisors (d_i, n/d_i) we chose the first two multiples say (k_i*d_i, m_i*n/d_i) which are exactly one square apart, then a(n) is the smallest product k_i*m_i and k_i*d_i is the largest divisor of k_i*m_i*n which is <= sqrt(k_i*m_i*n), and i runs over half the number of divisors of n (since only pairs are considered).
a(n) can also factor numbers as follow :(to be proven)
One pair of the roots of the five quadratic equations X^2-(2*A000196(a(n)*n)+{1,2,3,4 or 5})*X+a(n)*n =0 is a pair of positive integers say (X_1,X_2) then gcd(X_1,n) and gcd(X_2,n) are nontrivial divisors of n.
A382286 is the first sequence of an infinite sequence of sequences and the current sequence a(n) is the second one. These sequences can be defined as:
For each positive integer m, the corresponding sequence evaluated at a positive integer n is the least k such that floor(sqrt(n*k/d(n*k))) - floor(sqrt(d(n*k))) = m, where d(k) is the largest divisor of k which is <= sqrt(k).
If we denote for each m the corresponding sequence a_m(n), it is conjectured that (a_m(n)=(A000196(n)-m)^2 iff n is a prime > m^2+1) the cases m=0:A382286,1 are answered affirmatively

Examples

			Let C(k)=floor(sqrt(k/d(k))) - floor(sqrt(d(k))), where d(k) is the largest divisor of k which is <= sqrt(k):
a(1)=5 since C(k) > 1 for k=1 to 4 and C(5)=1
a(2)=4 since C(2*k) > 1 for k=1 to 3 and C(2*4)=1
a(3)=4 since C(3*k) > 1 for k=1 to 3 and C(3*4)=1
a(13*113)=7 because the first multiples of the prime factors which are exactly one square apart are 7*13 and 113.
a(13*114)=3 because from the pairs of conjugate divisors which are (1,1482), (2,741), (3,494), (6,247), (13,114), (19,78),(26,57) and (38,39) the first pair that have multiples exactly one square apart is (26,57) and these multiples are (3*26,57) and 57 is the largest divisor of 3*13*114 <= sqrt(3*13*114)
		

Programs

  • Maple
    d:= proc(n) max(select(t -> t^2 <= n, numtheory:-divisors(n))) end proc:
    f:= proc(n) local k,t;
         for k from 1 do
           t:= d(n*k);
           if floor(sqrt(n*k/t)) - floor(sqrt(t)) = 1 then return k fi
         od
    end proc:
    map(f, [$1..100]); # Robert Israel, Jun 04 2025
  • PARI
    d(n) = if(n<2, 1, my(d=divisors(n)); d[(length(d)+1)\2]); \\ A033676
    a(n) = my(k=1,dnk=d(n*k)); while (sqrtint(n*k/dnk) - sqrtint(dnk) != 1, k++;dnk=d(n*k)); k;

Formula

Conjecture: a(n) < (A000196(n)-1)^2 iff n>=9 is a composite number.
Conjecture: a(n) = (A000196(n)-1)^2 iff n>=9 is a prime number.

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

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.

A382286 a(n) is the least k such that floor(sqrt(n*k/d(n*k))) = floor(sqrt(d(n*k))), where d(k) is the largest divisor of k which is <= sqrt(k).

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 4, 2, 1, 2, 9, 2, 9, 2, 2, 1, 16, 2, 16, 1, 2, 5, 16, 1, 1, 5, 3, 1, 25, 1, 25, 1, 3, 8, 1, 1, 36, 8, 3, 1, 36, 1, 36, 3, 2, 8, 36, 1, 1, 2, 6, 3, 49, 2, 2, 1, 6, 13, 49, 2, 49, 13, 2, 1, 2, 2, 64, 4, 6, 2, 64, 2, 64, 18, 2, 4, 2, 2, 64, 4, 1, 18, 81, 2, 4, 18, 9, 4, 81
Offset: 1

Author

Hassan Baloui, Mar 20 2025

Keywords

Comments

In the case of semiprime numbers n=p*q, the sequence a(n) chooses the first two multiples of the prime factors p and q such that these multiples (say k*p, m*q) are between two consecutive squares, then a(n)=m*k.
In the case of any composite number n, for each pair of conjugate divisors (d_i, n/d_i) we choose the first two multiples say (k_i*d_i, m_i*n/d_i) which are between two consecutive squares. Then a(n) is the smallest product k_i*m_i where i runs over half the number of divisors of n (since only pairs are considered).
a(n) can also factor numbers as follow:
gcd(n,A000196(a(n)*n)+1-sqrt((A000196(a(n)*n)+1)^2-a(n)*n))
gcd(n,A000196(a(n)*n)+1+sqrt((A000196(a(n)*n)+1)^2-a(n)*n)) are proper divisors of n if sqrt(a(n)*n)-A000196(a(n)*n) < 1/2
Or
gcd(n,(2*A000196(a(n)*n)+1-sqrt((2*A000196(a(n)*n)+1)^2-4*a(n)*n))/2)
gcd(n,(2*A000196(a(n)*n)+1+sqrt((2*A000196(a(n)*n)+1)^2-4*a(n)*n))/2) are proper divisors of n if sqrt(a(n)*n)-A000196(a(n)*n) > 1/2

Examples

			Let C(k)=floor(sqrt(k/d(k)))-floor(sqrt(d(k))), where d(k) is the largest divisor of k which is <= sqrt(k):
a(1)=a(2)=a(3)=1 since  C(n)=0, for n=1,2,3.
a(4)=1 (and generally a(n^2)=1).
a(5)=4, since C(k*5) > 0 for k=1 to 3 and C(4*k)=0.
a(6)=1 since C(6)=0.
a(7)=4 since C(k*7) > 0 for k=1 to 3 and C(4*7)=0.
a(8)=2 since C(8)=1 and C(2*8)=0.
a(9)=1
a(11)=9 since C(k*11) > 0 for k=1 to 8 and C(9*11)=0.
		

Crossrefs

Programs

  • PARI
    d(n) = if(n<2, 1, my(d=divisors(n)); d[(length(d)+1)\2]); \\ A033676
    a(n) = my(k=1); while (sqrtint(n*k/d(n*k)) != sqrtint(d(n*k)), k++); k; \\ Michel Marcus, Mar 21 2025

Formula

a(n) < A048760(n) iff n is a composite number.
a(n) = A048760(n) iff n is a prime number.
a(p^(2*m+1)) = p*a(p)/A048760(p) for any pair (p,m) of a prime number p and a natural number m (except the case (2,2)).
a(n^2) = 1.
If we combines the first two properties we get floor(a(n)/A048760(n))=A010051(n),
And partial sum of floor(a(n)/A048760(n)) from 2 to N = A000720(N).