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.

Showing 1-1 of 1 results.

A340393 Treat the prime factors of n in ascending order as digits of a number in base "greatest prime factor + 1" and convert this number back to a decimal number.

Original entry on oeis.org

2, 3, 8, 5, 11, 7, 26, 15, 17, 11, 43, 13, 23, 23, 80, 17, 47, 19, 89, 31, 35, 23, 171, 35, 41, 63, 151, 29, 95, 31, 242, 47, 53, 47, 175, 37, 59, 55, 521, 41, 159, 43, 323, 131, 71, 47, 683, 63, 107, 71, 433, 53, 191, 71, 1175, 79, 89, 59, 527, 61, 95, 223, 728
Offset: 2

Views

Author

S. Brunner, Jan 06 2021

Keywords

Examples

			Some examples for the calculation of a(n):
(For digits 10,11...36 the letters A,B...Z are used.)
    n -> prime factors     -> a(n)(base) -> a(n)(base 10)
    6 -> 2 * 3             ->   23 (4)   ->   11
   20 -> 2 * 2 * 5         ->  225 (6)   ->   89
   33 -> 3 * 11            ->   3B (12)  ->   47
   56 -> 2 * 2 * 2 * 7     -> 2227 (8)   -> 1175
   62 -> 2 * 31            ->   2U (32)  ->   95
   72 -> 2 * 2 * 2 * 3 * 3 ->22233 (4)   ->  687
  100 -> 2 * 2 * 5 * 5     -> 2255 (6)   ->  539
  910 -> 2 * 5 * 7 * 13    -> 257D (14)  -> 6579
		

Crossrefs

Cf. A037274 (home primes), A037276, A340394.

Programs

  • Maple
    a:= n-> (l-> (m-> add(l[-i]*m^(i-1), i=1..nops(l)))(1+
        max(l)))(map(i-> i[1]$i[2], sort(ifactors(n)[2]))):
    seq(a(n), n=2..77);  # Alois P. Heinz, Jan 09 2021
  • PARI
    a(n) = my(f=factor(n), list=List()); for (k=1, #f~, for (j=1, f[k, 2], listput(list, f[k,1]))); fromdigits(Vec(list), vecmax(f[,1])+1); \\ Michel Marcus, Jan 06 2021
  • Python
    def A(startn,lastn=0):
        a,n,lastn=[],startn,max(lastn,startn)
        while n<=lastn:
            i,j,v,m,f=2,0,0,n,[]
            while i
    				
  • Python
    from sympy import factorint
    def fromdigits(d, b):
      n = 0
      for di in d: n *= b; n += di
      return n
    def a(n):
      f = sorted(factorint(n, multiple=True))
      return fromdigits(f, f[-1]+1)
    print([a(n) for n in range(2, 76)]) # Michael S. Branicky, Jan 06 2021
    

Formula

a(p) = p for prime p.
Showing 1-1 of 1 results.