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: Tanmaya Mohanty

Tanmaya Mohanty's wiki page.

Tanmaya Mohanty has authored 7 sequences.

A376445 Numbers k such that A374941(k) > k.

Original entry on oeis.org

24, 36, 48, 60, 72, 84, 90, 96, 108, 120, 132, 144, 160, 168, 180, 192, 210, 216, 240, 252, 264, 270, 280, 288, 300, 312, 320, 336, 360, 384, 396, 408, 420, 432, 456, 468, 480, 504, 528, 540, 552, 560, 576, 600, 612, 624, 630, 640, 648, 660, 672, 684, 696, 720
Offset: 1

Author

Tanmaya Mohanty, Sep 22 2024

Keywords

Examples

			24 is a term because A374941(24) = 28 > 24.
		

Crossrefs

Programs

  • Python
    from sympy import divisors, isprime
    from functools import cache
    @cache
    def f(n): return sum(di if isprime(di) else f(di) for di in divisors(n)[1:-1])
    def ok(n): return f(n) > n
    print([k for k in range(1, 801) if ok(k)]) # Michael S. Branicky, Sep 23 2024

A374941 a(n) = (sum of proper prime factors of n) + Sum_{d = proper composite factor of n} a(d).

Original entry on oeis.org

0, 0, 0, 2, 0, 5, 0, 4, 3, 7, 0, 12, 0, 9, 8, 8, 0, 13, 0, 16, 10, 13, 0, 28, 5, 15, 6, 20, 0, 30, 0, 16, 14, 19, 12, 40, 0, 21, 16, 36, 0, 36, 0, 28, 19, 25, 0, 64, 7, 19, 20, 32, 0, 32, 16, 44, 22, 31, 0, 90, 0, 33, 23, 32, 18, 48, 0, 40, 26, 42, 0, 112, 0, 39
Offset: 1

Author

Tanmaya Mohanty, Jul 24 2024

Keywords

Examples

			For n=24, the tree of recurrences "a(d)" is
         24
  /  /  /  \  \  \
  2  3  4  6   8  12
       /  / \  / \  \ \ \ \
      2  2  3  2  4  2 3 4 6
                 /      /  / \
                2      2   2  3
a(24) = 2 + 3 + a(4) + a(6) + a(8) + a(12)
= 5 + 2 + 2 + 3 + 2 + a(4) + 2 + 3 + a(4) + a(6)
= 14 + 2 + 5 + 2 + 2 + 3
= 28
		

Crossrefs

Cf. A371075 (fixed points).

Programs

  • Python
    from sympy import divisors, isprime
    def a(n): return sum(di if isprime(di) else a(di) for di in divisors(n)[1:-1])
    print([a(n) for n in range(1, 75)]) # Michael S. Branicky, Jul 24 2024

Formula

a(p) = 0, iff p = 1 or a prime number.
a(p^k) == 2^(k-2)*p for p prime, k > 1. - Michael S. Branicky, Aug 01 2024

Extensions

More terms from Michael S. Branicky, Jul 24 2024

A371075 Fixed points of A374941.

Original entry on oeis.org

12, 30, 80, 324, 448, 888, 11264, 53248, 1114112, 3684352, 4980736, 18055168, 96468992
Offset: 1

Author

Tanmaya Mohanty, Mar 10 2024

Keywords

Examples

			12 is a term because A374941(12) = 12.
		

Crossrefs

Programs

  • PARI
    f(n) = my(d=divisors(n)); sum(i=2, #d-1, if (isprime(d[i]), d[i], f(d[i])));
    isok(k) = f(k) == k; \\ Michel Marcus, Mar 10 2024
    
  • Python
    from sympy import divisors, isprime
    from functools import cache
    @cache
    def f(n): return sum(di if isprime(di) else f(di) for di in divisors(n)[1:-1])
    def ok(n): return n == f(n)
    print([k for k in range(1, 1000) if ok(k)]) # Michael S. Branicky, Mar 31 2024 after Michel Marcus

Formula

Equals the ordered set {k: A374941(k) = k}.

Extensions

a(13) from Michael S. Branicky, Mar 31 2024

A367642 a(n) is the smallest natural number such that the number of perfect powers less than n equals the number of perfect powers between n and a(n) (exclusive).

Original entry on oeis.org

2, 5, 5, 9, 10, 10, 10, 17, 28, 33, 33, 33, 33, 33, 33, 37, 50, 50, 50, 50, 50, 50, 50, 50, 65, 82, 101, 122, 122, 122, 122, 126, 129, 129, 129, 145, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 197, 217, 217, 217, 217, 217, 217, 217, 217, 217
Offset: 1

Author

Tanmaya Mohanty, Nov 25 2023

Keywords

Examples

			a(1) = 2 as there are no perfect powers less than 1, and none between 1 and 2.
a(9) = 28 as there are 3 perfect powers less than 9 (1, 4 and 8), and between 9 and 28 (16, 25 and 27).
		

Crossrefs

Programs

  • PARI
    ispp(n) = {ispower(n) || n==1}; \\ A001597
    f(n) = sum(k=1, n-1, ispp(k));
    a(n) = my(k=n, nb=f(n)); while(f(k)-f(n+1) != f(n), k++); k; \\ Michel Marcus, Nov 30 2023
    
  • Python
    from sympy import mobius, integer_nthroot, perfect_power
    def A367642(n):
        if n == 1: return 2
        def f(x): return int(1-sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        m = (f(n)<<1)-bool(perfect_power(n))
        def g(x): return m+x-f(x)
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return bisection(g,m,m)+1 # Chai Wah Wu, Sep 09 2024

A364969 a(n) = a(a(n-1)) if n is even, a(n) is the number of times a(n-1) occurs in the sequence so far if n is odd, with a(1) = 1.

Original entry on oeis.org

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

Author

Tanmaya Mohanty, Oct 23 2023

Keywords

Comments

Conjecture: All positive integers appear in the sequence.

Examples

			a(1) = 1 (by definition).
a(2) = a(a(1)) = a(1) = 1 (2 is even).
a(3) = number of times a(2) occurs = number of times 1 occurs = 2 (3 is odd).
a(4) = a(a(3)) = a(2) = 1 (4 is even).
a(5) = number of times a(4) occurs = number of times 1 occurs = 3 (5 is odd).
a(6) = a(a(5)) = a(3) = 2 (6 is even).
		

Programs

  • PARI
    lista(nn) = my(va = vector(nn)); va[1] = 1; for (n=2, nn, if (n%2, va[n] = #select(x->(x==va[n-1]), va), va[n] = va[va[n-1]]);); va; \\ Michel Marcus, Oct 23 2023

A366914 Numbers expressible as the sum of their distinct prime factors raised to a natural exponent.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 30, 31, 32, 37, 41, 42, 43, 47, 49, 53, 59, 60, 61, 64, 67, 70, 71, 73, 79, 81, 83, 84, 89, 90, 97, 101, 102, 103, 107, 109, 113, 121, 125, 127, 128, 131, 132, 137, 139, 140, 149, 150, 151, 157, 163, 167
Offset: 1

Author

Tanmaya Mohanty, Oct 27 2023

Keywords

Comments

Each prime factor must appear exactly once in the sum.

Examples

			30 is a term because its distinct prime factors are 2, 3 and 5, and 30 = 2^1 + 3^1 + 5^2 = 2^4 + 3^2 + 5^1.
42 is a term because its distinct prime factors are 2, 3 and 7, and 42 = 2^3 + 3^3 + 7^1 = 2^5 + 3^1 + 7^1.
60 is a term because its distinct prime factors are 2, 3 and 5, and 60 = 2^5 + 3^1 + 5^2.
		

Programs

  • Maple
    filter:= proc(n) local P,S,p,i;
      P:= numtheory:-factorset(n);
      S:= mul(add(x^(p^i),i=1..floor(log[p](n))),p=P);
      coeff(S,x,n) > 0
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Dec 27 2023
  • PARI
    isok(n)={my(f=factor(n)[,1], m=n-vecsum(f)); polcoef(prod(k=1, #f, my(c=f[k]); sum(j=1, logint(m+c, c), x^(c^j-c)) , 1 + O(x*x^m)), m)} \\ Andrew Howroyd, Oct 27 2023

Extensions

Terms a(43) and beyond from Andrew Howroyd, Oct 27 2023

A366080 Numbers that give a perfect power when added to their reverse.

Original entry on oeis.org

2, 4, 8, 29, 38, 47, 56, 65, 74, 83, 92, 110, 122, 143, 164, 198, 221, 242, 263, 297, 320, 341, 362, 396, 440, 461, 495, 560, 594, 693, 792, 891, 990, 1030, 1120, 1210, 1300, 10100, 10148, 10340, 10395, 10403, 10683, 10908, 10980, 11138, 11330, 11385, 11673
Offset: 1

Author

Tanmaya Mohanty, Oct 24 2023

Keywords

Examples

			8 is a term because 8 + 8 = 16 = 2^4 or 4^2.
10340 is a term because 10340 + 04301 = 14641 is a perfect power 11^4.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,i,x;
      L:= convert(n,base,10);
      x:= add(10^(i-1)*L[-i],i=1..nops(L));
      igcd(ifactors(n+x)[2][..,2])>1;
    end proc:
    select(filter, [$1..20000]); # Robert Israel, Oct 24 2023
  • PARI
    isok(k) = ispower(k + fromdigits(Vecrev(digits(k)))); \\ Michel Marcus, Oct 24 2023

Extensions

More terms from Robert Israel, Oct 24 2023