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.

A337183 If n is composite, a(n) is the number represented by the list of prime factors of n (with multiplicity, sorted in nondecreasing order) in base the sum of that list. If n is prime, a(n) = n.

Original entry on oeis.org

2, 3, 10, 5, 13, 7, 86, 21, 19, 11, 115, 13, 25, 29, 1170, 17, 155, 19, 185, 37, 37, 23, 1641, 55, 43, 273, 271, 29, 235, 31, 22222, 53, 55, 67, 2233, 37, 61, 61, 2931, 41, 331, 43, 491, 401, 73, 47, 32211, 105, 353, 77, 625, 53, 3061, 91, 4765, 85, 91, 59, 3785, 61, 97, 553, 542906, 103, 571, 67
Offset: 2

Views

Author

J. M. Bergot and Robert Israel, Jan 29 2021

Keywords

Comments

If p is prime, a(p^k) = p*((k*p)^k-1)/(k*p-1).
If n = p*q with primes p <= q, a(n) = p^2 + p*q + q.

Examples

			For n = 12, the list of prime factors is [2,2,3], the base is 2+2+3=7, and a(12) = 223_7 = 115.
		

Programs

  • Maple
    f:= proc(n) local F,b,i;
      F:= sort(map(t -> t[1]$t[2],ifactors(n)[2]),`>`);
      b:= convert(F,`+`);
      (add(F[i]*b^(i-1),i=1..nops(F)));
    end proc:
    map(f, [$2..100]);
  • Mathematica
    Array[If[PrimeQ@ #, #, FromDigits[#, Total[#]] &@ Flatten[ConstantArray @@@ FactorInteger[#]]] &, 66, 2] (* Michael De Vlieger, Jan 29 2021 *)