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.

This page as a plain text file.
%I A290641 #26 Apr 23 2021 01:31:21
%S A290641 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,
%T A290641 74,27,52,107,42,113,32,87,106,91,36,151,122,111,56,173,78,181,116,63,
%U A290641 158,199,48,169,98,159,148,239,54,203,104,183,214,271,84,281,226,117,64,259
%N A290641 Multiplicative with a(p^e) = prime(p-1)^e.
%C A290641 a(n) = A064554(n) for 1 <= n < 91, but a(91) = 481 differs from A064554(91) = 463. - _Georg Fischer_, Oct 23 2018
%H A290641 Antti Karttunen, <a href="/A290641/b290641.txt">Table of n, a(n) for n = 1..10000</a>
%H A290641 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>
%F A290641 From _Antti Karttunen_, Aug 08 2017: (Start)
%F A290641 a(n) = A064989(A064988(n)).
%F A290641 A046523(a(n)) = A046523(n). [Preserves the prime signature of n].
%F A290641 (End)
%t A290641 Array[If[# == 1, 1, Times @@ Map[Prime[#1 - 1]^#2 & @@ # &, FactorInteger[#]]] &, 65] (* _Michael De Vlieger_, Apr 22 2021 *)
%o A290641 (PARI) a(n) = {my(f = factor(n)); for (k=1, #f~, f[k, 1] = prime(f[k, 1]-1);); factorback(f);}
%o A290641 (Scheme) (define (A290641 n) (if (= 1 n) n (* (A000040 (+ -1 (A020639 n))) (A290641 (A032742 n))))) ;; _Antti Karttunen_, Aug 08 2017
%o A290641 (Python)
%o A290641 from sympy import factorint, prime
%o A290641 from operator import mul
%o A290641 from functools import reduce
%o A290641 def a(n):
%o A290641     return 1 if n==1 else reduce(mul, [prime(p - 1)**e for p, e in factorint(n).items()])
%o A290641 print([a(n) for n in range(1, 101)]) # _Indranil Ghosh_, Aug 08 2017
%Y A290641 Cf. A046523, A055003, A064554, A064988, A064989.
%K A290641 nonn,mult
%O A290641 1,2
%A A290641 _Michel Marcus_, Aug 08 2017