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.

A290641 Multiplicative with a(p^e) = prime(p-1)^e.

Original entry on oeis.org

1, 2, 3, 4, 7, 6, 13, 8, 9, 14, 29, 12, 37, 26, 21, 16, 53, 18, 61, 28, 39, 58, 79, 24, 49, 74, 27, 52, 107, 42, 113, 32, 87, 106, 91, 36, 151, 122, 111, 56, 173, 78, 181, 116, 63, 158, 199, 48, 169, 98, 159, 148, 239, 54, 203, 104, 183, 214, 271, 84, 281, 226, 117, 64, 259
Offset: 1

Views

Author

Michel Marcus, Aug 08 2017

Keywords

Comments

a(n) = A064554(n) for 1 <= n < 91, but a(91) = 481 differs from A064554(91) = 463. - Georg Fischer, Oct 23 2018

Crossrefs

Programs

  • Mathematica
    Array[If[# == 1, 1, Times @@ Map[Prime[#1 - 1]^#2 & @@ # &, FactorInteger[#]]] &, 65] (* Michael De Vlieger, Apr 22 2021 *)
  • PARI
    a(n) = {my(f = factor(n)); for (k=1, #f~, f[k, 1] = prime(f[k, 1]-1);); factorback(f);}
    
  • Python
    from sympy import factorint, prime
    from operator import mul
    from functools import reduce
    def a(n):
        return 1 if n==1 else reduce(mul, [prime(p - 1)**e for p, e in factorint(n).items()])
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Aug 08 2017
  • Scheme
    (define (A290641 n) (if (= 1 n) n (* (A000040 (+ -1 (A020639 n))) (A290641 (A032742 n))))) ;; Antti Karttunen, Aug 08 2017
    

Formula

From Antti Karttunen, Aug 08 2017: (Start)
a(n) = A064989(A064988(n)).
A046523(a(n)) = A046523(n). [Preserves the prime signature of n].
(End)