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.

A283478 a(n) = A097248(A108951(n)).

Original entry on oeis.org

1, 2, 6, 3, 30, 5, 210, 6, 15, 7, 2310, 10, 30030, 11, 21, 5, 510510, 30, 9699690, 14, 33, 13, 223092870, 15, 105, 17, 14, 22, 6469693230, 42, 200560490130, 10, 39, 19, 165, 7, 7420738134810, 23, 51, 21, 304250263527210, 66, 13082761331670030, 26, 70, 29, 614889782588491410, 30, 1155, 210, 57, 34, 32589158477190044730, 21, 195, 33, 69, 31
Offset: 1

Views

Author

Antti Karttunen, Mar 16 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[FixedPoint[Times @@ Map[#1^#2 & @@ # &, Partition[#, 2, 2] &@ Flatten[FactorInteger[#] /. {p_, e_} /; e >= 2 :> {If[OddQ@ e, {p, 1}, {1, 1}], {NextPrime@ p, Floor[e/2]}}]] &, #] &[Times @@ Map[#1^#2 & @@ # &, FactorInteger[n] /. {p_, e_} /; e > 0 :> {Times @@ Prime@ Range@ PrimePi@ p, e}]], {n, 58}] (* Michael De Vlieger, Mar 18 2017 *)
  • PARI
    A034386(n) = prod(i=1, primepi(n), prime(i));
    A108951(n) = { my(f=factor(n)); prod(i=1, #f~, A034386(f[i, 1])^f[i, 2]) };  \\ From Charles R Greathouse IV, Jun 28 2015
    A097246(n) = { my(f=factor(n)); prod(i=1, #f~, (nextprime(f[i,1]+1)^(f[i,2]\2))*((f[i,1])^(f[i,2]%2))); };
    A097248(n) = { my(k=A097246(n)); while(k<>n, n = k; k = A097246(k)); k; };
    A283478(n) = A097248(A108951(n));
    
  • Python
    from sympy import primerange, factorint, nextprime
    from operator import mul
    def P(n): return reduce(mul, [i for i in primerange(2, n + 1)])
    def a108951(n):
        f = factorint(n)
        return 1 if n==1 else reduce(mul, [P(i)**f[i] for i in f])
    def a097246(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [(nextprime(i)**int(f[i]/2))*(i**(f[i]%2)) for i in f])
    def a097248(n):
        k=a097246(n)
        while k!=n:
            n=k
            k=a097246(k)
        return k
    def a(n): return a097248(a108951(n)) # Indranil Ghosh, May 15 2017
  • Scheme
    (define (A283478 n) (A097248 (A108951 n)))
    

Formula

a(n) = A097248(A108951(n)).
Other identities:
For all n >= 0, a(A019565(n)) = A283475(n).