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: Robert Israel

Robert Israel's wiki page.

Robert Israel has authored 1585 sequences. Here are the ten most recent ones:

A387333 a(n) is the least k having exactly n divisors that are not balanced numbers.

Original entry on oeis.org

1, 4, 8, 16, 20, 48, 40, 72, 80, 120, 144, 180, 320, 240, 440, 432, 540, 360, 792, 864, 900, 960, 1620, 720, 1080, 1920, 2808, 2016, 2340, 1440, 3168, 3024, 2160, 4032, 5616, 2880, 5940, 8100, 3600, 6048, 3960, 5040, 6480, 10920, 7560, 14112, 11700, 7200, 8640, 11880, 13104, 13680, 7920, 10080
Offset: 0

Author

Robert Israel, Aug 26 2025

Keywords

Comments

a(n) is the least k such that A386591(k) = n.

Examples

			a(3) = 16 because 16 has exactly 3 divisors that are not balanced numbers, namely 4, 8 and 16, and no smaller number works.
		

Crossrefs

Programs

  • Maple
    g:= proc(n) option remember; numtheory:-sigma(n) mod numtheory:-phi(n) <> 0 end proc:
    f:= n -> nops(select(g,numtheory:-divisors(n))):
    N:= 60: # for a(0) to a(N)
    V:= Array(0..N,-1): count:= 0:
    for i from 1 while count < N+1 do
      v:= f(i);
      if V[v] = -1 then count:= count+1; V[v]:= i; fi
    od:
    convert(V,list);
  • PARI
    a(n) = my(k=1); while (sumdiv(k, d, sigma(d)%eulerphi(d) != 0) != n, k++); k; \\ Michel Marcus, Aug 26 2025

A387463 Total number of 3's in the decimal digits of the divisors of n.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 2, 1, 1, 3, 1, 1, 2, 1, 1, 3, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 2, 0, 1, 2, 1, 1, 3, 0, 1, 2, 1, 0, 2, 1, 1, 1, 1, 0, 3, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 2, 1, 1, 3, 0, 0, 2, 0, 0, 3
Offset: 1

Author

Robert Israel, Aug 29 2025

Keywords

Examples

			a(33) = 3 because among the divisors of 33, 3 has one 3 and 33 has two, for a total of 3.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t; add(subs(x=1, t)^3, t = expand((1+x+x^2)^n)) end proc:
    map(f, [$1..100]);
  • Mathematica
    a[n_]:=Count[Flatten[IntegerDigits/@Divisors[n]],3];Array[a,99] (* James C. McMahon, Aug 30 2025 *)
  • Python
    from sympy import divisors
    def a(n): return sum(str(d).count("3") for d in divisors(n, generator=True))
    print([a(n) for n in range(1, 100)]) # Michael S. Branicky, Aug 29 2025

A387396 a(n) is the smallest positive number with a total of exactly n 2's in the decimal digits of its divisors.

Original entry on oeis.org

1, 2, 12, 22, 72, 84, 168, 264, 252, 756, 504, 672, 1260, 1512, 2184, 2640, 2772, 2016, 2520, 4032, 5544, 5040, 6048, 6720, 7392, 13104, 12096, 16632, 10080, 15120, 18144, 21840, 33600, 25200, 34320, 22176, 20160, 34272, 30240, 42840, 45360, 36960, 50400, 52416, 55440, 94248, 65520, 66528, 60480
Offset: 0

Author

Robert Israel, Aug 28 2025

Keywords

Comments

a(n) is the least number k such that A387394(k) = n.

Examples

			a(3) = 22 because of the divisors of 22, 2 has one 2, 22 has two, for a total of 3, and 22 is the smallest number that works.
		

Crossrefs

Programs

  • Maple
    ff:= proc(n) option remember; numboccur(2, convert(n, base, 10)) end proc:
    f:= proc(n) local d; add(ff(d), d=numtheory:-divisors(n)) end proc:
    V:= Array(0..50): count:= 0:
    for x from 1 while count < 51 do
      v:= f(x); if v <= 50 and V[v] = 0 then V[v]:= x; count:= count+1; fi
    od:
    convert(V,list);
  • Mathematica
    a[n_]:=Module[{k=1}, While[Count[IntegerDigits[Divisors[k]]//Flatten, 2]!=n, k++]; k]; Array[a, 49,0] (* Stefano Spezia, Aug 29 2025 *)
  • PARI
    f(n) = sumdiv(n, d, #select(x->(x==2), digits(d))); \\ A387394
    a(n) = my(k=1); while(f(k) !=n, k++); k; \\ Michel Marcus, Aug 28 2025
    
  • Python
    from itertools import count, islice
    def f(n): return sum(str(d).count("2") for d in divisors(n, generator=True))
    def agen(): # generator of terms
        n, adict = 0, dict()
        for k in count(1):
            v = f(k)
            if v not in adict:
                adict[v] = k
                while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 50))) # Michael S. Branicky, Aug 29 2025

Formula

A387394(a(n)) = n.

A387394 Total number of 2's in the decimal digits of the divisors of n.

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 2, 1, 3, 1, 3, 1, 2, 1, 2, 1, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 3, 0, 3, 0, 2, 0, 3, 0, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 3, 0, 2, 1, 2, 0, 3, 0, 1, 1, 1, 0, 4, 0, 1, 1, 1, 0, 2, 0, 2, 1, 2, 0, 5, 0, 1, 1, 3, 0, 1, 0, 3, 0, 1, 0, 4, 0, 1, 0
Offset: 1

Author

Robert Israel, Aug 28 2025

Keywords

Examples

			a(22) = 3 because among the divisors of 22, 2 has one 2 and 22 has two, for a total of 3.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local d; add(numboccur(2, convert(d, base, 10)), d=numtheory:-divisors(n)) end proc:
    map(f, [$1..200]);
  • Mathematica
    a[n_]:=Count[IntegerDigits[Divisors[n]]//Flatten, 2]; Array[a, 99] (* Stefano Spezia, Aug 29 2025 *)
  • PARI
    a(n) = sumdiv(n, d, #select(x->(x==2), digits(d))); \\ Michel Marcus, Aug 28 2025
    
  • Python
    from sympy import divisors
    def a(n): return sum(str(d).count("2") for d in divisors(n, generator=True))
    print([a(n) for n in range(1, 100)]) # Michael S. Branicky, Aug 29 2025

A385494 Total number of 1's in the decimal digits of the divisors of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 2, 1, 2, 1, 2, 1, 3, 2, 2, 3, 2, 1, 3, 1, 2, 2, 2, 2, 3, 1, 3, 2, 1, 1, 3, 1, 2, 3, 2, 1, 2, 3, 2, 2, 1, 1, 4, 2, 2, 2, 2, 2, 3, 1, 2, 1, 3, 2, 3, 1, 1, 2, 2, 3, 2, 1, 3, 2, 2, 1, 4, 2, 1, 1, 3, 1, 4, 3, 1, 2, 1, 2, 3, 1, 2, 3, 3
Offset: 1

Author

Robert Israel, Aug 27 2025

Keywords

Examples

			a(11) = 3 because of the divisors of 11, there is one 1 in 1 and two in 11.
a(60) = 4 because of the divisors of 60, there is one 1 in 1, one in 10, one in 12, one in 15 and none in the other divisors.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local d; add(numboccur(1, convert(d,base,10)),d=numtheory:-divisors(n)) end proc:
    map(f, [$1..100]);
  • Mathematica
    a[n_]:=Count[IntegerDigits[Divisors[n]]//Flatten,1]; Array[a,100] (* Stefano Spezia, Aug 28 2025 *)
  • PARI
    a(n) = sumdiv(n, d, #select(x->(x==1), digits(d))); \\ Michel Marcus, Aug 28 2025
  • Python
    from sympy import divisors
    def a(n): return sum(str(d).count("1") for d in divisors(n, generator=True))
    print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Aug 27 2025
    

A387357 a(n) is the first number with a total of exactly n 1's in the decimal digits of its divisors.

Original entry on oeis.org

1, 10, 11, 60, 112, 110, 210, 330, 420, 630, 840, 1008, 1890, 1260, 1680, 2520, 2310, 3360, 5460, 6720, 4620, 5040, 7140, 7560, 11880, 9240, 14040, 10080, 17160, 13860, 17136, 16380, 15120, 18480, 27720, 33264, 21420, 39270, 30240, 36960, 41580, 45360, 42840, 57120, 60060, 71820, 75600, 55440
Offset: 1

Author

Robert Israel, Aug 27 2025

Keywords

Comments

a(n) is the least number k such that A385494(k) = n.

Examples

			a(6) = 110 because of the divisors of 110, 1 and 10 each have one 1, 11 and 110 each have two, for a total of 6, and no smaller number works.
		

Crossrefs

Cf. A385494.

Programs

  • Maple
    f:= proc(n) local t;
       add(numboccur(1, convert(t,base,10)), t = numtheory:-divisors(n))
    end proc:
    N:= 100: # for a(1)..a(N)
    V:= Vector(N): count:= 0:
    for x from 1 do
      v:= f(x);
      if v <= N and V[v] = 0 then V[v]:= x; count:= count+1; if count =  N then break fi fi;
    od:
    convert(V,list);
  • Mathematica
    a[n_]:=Module[{k=1},While[Count[IntegerDigits[Divisors[k]]//Flatten,1]!=n, k++]; k]; Array[a,48] (* Stefano Spezia, Aug 28 2025 *)
  • Python
    from itertools import count, islice
    def f(n): return sum(str(d).count("1") for d in divisors(n, generator=True))
    def agen(): # generator of terms
        n, adict = 1, dict()
        for k in count(1):
            v = f(k)
            if v not in adict:
                adict[v] = k
                while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 50))) # Michael S. Branicky, Aug 27 2025

Formula

A385494(a(n)) = n.

A385885 Nonprimes k such that k^2 - sopfr(k)^2 is a square, where sopfr = A001414.

Original entry on oeis.org

1, 4, 366, 1095, 51846, 258410, 982815, 10653351
Offset: 1

Author

Robert Israel, Aug 13 2025

Keywords

Examples

			a(4) = 1095 is a term because 1095 = 3 * 5 * 73 and 1095^2 - (3+5+73)^2 = 1192464 = 1092^2.
		

Crossrefs

Programs

  • Maple
    sopfr:= proc(n) local t; add(t[1]*t[2], t=ifactors(n)[2]) end proc:
    filter:= t -> not isprime(t) and issqr(t^2 - sopfr(t)^2):
    select(filter, [$1..10^8]);
  • Mathematica
    q[k_] := !PrimeQ[k] && IntegerQ[Sqrt[k^2 - (Plus @@ Times @@@ FactorInteger[k])^2]]; Select[Range[10^6], q] (* Amiram Eldar, Aug 14 2025 *)
  • PARI
    isok(k) = if (!ispseudoprime(k), my(f=factor(k)); issquare(k^2 - (f[, 1]~*f[, 2])^2)); \\ Michel Marcus, Aug 21 2025
  • Python
    from math import isqrt
    from sympy import factorint, isprime
    def is_square(n): return n >= 0 and isqrt(n)**2 == n
    def ok(n): return  not isprime(n) and is_square(n**2-sum(p*e for p,e in factorint(n).items())**2)
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Aug 14 2025
    

Extensions

Edited to insert 1 by Robert Israel, Aug 22 2025

A387049 Numbers k such that both k + sopfr(k) and k^2 + sopfr(k)^2 are prime, where sopfr = A001414.

Original entry on oeis.org

6, 10, 12, 14, 21, 44, 46, 51, 57, 65, 74, 86, 90, 111, 141, 155, 161, 166, 210, 212, 221, 252, 254, 295, 297, 300, 306, 365, 371, 404, 415, 447, 466, 485, 504, 513, 514, 524, 545, 629, 634, 640, 674, 685, 720, 767, 866, 910, 914, 930, 985, 1020, 1035, 1062, 1124, 1135, 1157, 1189, 1197, 1214
Offset: 1

Author

Robert Israel, Aug 14 2025

Keywords

Comments

Includes 2*p if p is a prime such that 3*p + 2 and 5 * p^2 + 4 * p + 4 are prime. The Generalized Bunyakowsky Conjecture implies there are infinitely many of these.

Examples

			a(3) = 12 is a term because sopfr(12) = 2*2 + 3 = 7 and both 12 + 7 = 19 and 12^2 + 7^2 = 193 are prime.
		

Crossrefs

Cf. A001414. Intersection of A050703 and A387048.

Programs

  • Maple
    sopfr:= proc(n) local t; add(t[1]*t[2], t=ifactors(n)[2]) end proc:
    filter:= proc(n) local s; s:= sopfr(n); isprime(n+s) and isprime(n^2 + s^2) end proc:
    select(filter, [$1..2000]);
  • Mathematica
    q[k_] := Module[{sopfr = Plus @@ Times @@@ FactorInteger[k]}, PrimeQ[k + sopfr] && PrimeQ[k^2 + sopfr^2]]; Select[Range[2, 1214], q] (* Amiram Eldar, Aug 14 2025 *)

A387048 Numbers k such that k^2 + sopfr(k)^2 is prime, where sopfr = A001414.

Original entry on oeis.org

6, 10, 12, 14, 21, 22, 39, 40, 44, 46, 51, 54, 57, 62, 65, 69, 74, 80, 82, 86, 90, 91, 95, 104, 108, 111, 115, 119, 129, 134, 141, 155, 161, 164, 166, 172, 176, 187, 189, 202, 210, 212, 217, 221, 226, 232, 244, 248, 252, 254, 265, 272, 274, 287, 292, 295, 297, 299, 300, 302, 305, 306, 328, 339
Offset: 1

Author

Robert Israel, Aug 14 2025

Keywords

Comments

Includes 2*p where p is a prime such that 5 * p^2 + 4 * p + 4 is prime. The Generalized Bunyakowsky Conjecture implies there are infinitely many of these.

Examples

			a(3) = 12 is a term because 12^2 + sopfr(12)^2 = 144 + (2*2+3)^2 = 193 is prime.
		

Crossrefs

Programs

  • Maple
    sopfr:= proc(n) local t; add(t[1]*t[2], t=ifactors(n)[2]) end proc:
    filter:= t -> isprime(t^2 + sopfr(t)^2):
    select(filter, [$1..10^3]);
  • Mathematica
    q[k_] := PrimeQ[k^2 + (Plus @@ Times @@@ FactorInteger[k])^2]; Select[Range[2, 340], q] (* Amiram Eldar, Aug 14 2025 *)

A386991 Numbers k such that k^2 + sopfr(k)^2 is a square, where sopfr = A001414.

Original entry on oeis.org

1, 8, 15, 35, 112, 143, 323, 899, 1763, 3599, 5183, 10403, 11663, 19043, 22499, 32399, 36863, 39203, 51983, 57599, 72899, 79523, 97343, 121103, 176399, 186623, 213443, 272483, 324899, 359999, 381923, 412163, 435599, 656099, 675683, 685583, 736163
Offset: 1

Author

Robert Israel, Aug 12 2025

Keywords

Comments

Includes A037074 because if k = p*(p+2) where p and p+2 are primes, k^2 + sopfr(k)^2 = p^2*(p+2)^2 + (2*p+2)^2 = (p^2 + 2*p + 2)^2.
Are 1, 8 and 112 the only terms not in A037074?

Examples

			a(3) = 15 is a term because the sum of prime factors of 15 is 3+5 = 8 and 15^2 + 8^2 = 289 = 17^2.
		

Crossrefs

Cf. A001414, A386246. Includes A037074.

Programs

  • Maple
    sopfr:= proc(n) local t; add(t[1]*t[2],t=ifactors(n)[2]) end proc:
    filter:= t -> issqr(t^2 + sopfr(t)^2):
    select(filter, [$1..10^5]);
  • Mathematica
    Sopfr[1]=0;Sopfr[n_]:= Plus @@ Times @@@ FactorInteger@ n;Select[Range[500000],IntegerQ[Sqrt[#^2+Sopfr[#]^2]]&] (* James C. McMahon, Aug 14 2025 *)