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.

A141564 Subtract 1 from all bases and exponents which are greater than 1 in the prime number decomposition of n.

This page as a plain text file.
%I A141564 #13 Jul 26 2025 09:30:24
%S A141564 0,1,2,1,4,2,6,1,2,4,10,2,12,6,8,1,16,2,18,4,12,10,22,2,4,12,4,6,28,8,
%T A141564 30,1,20,16,24,2,36,18,24,4,40,12,42,10,8,22,46,2,6,4,32,12,52,4,40,6,
%U A141564 36,28,58,8,60,30,12,1,48,20,66,16,44,24,70,2,72,36,8,18,60,24,78,4,8
%N A141564 Subtract 1 from all bases and exponents which are greater than 1 in the prime number decomposition of n.
%C A141564 Start from the prime number decomposition of n, that is the list 1, 2, 3, 2^2, 5, 2*3, 7, 2^3, 3^2, 2*5, 11, 2^2*3... Subtract 1 from all visible bases and exponents (visible in the sense that exponents are not written down if they equal 1), to give 1-1, 2-1, 3-1, (2-1)^(2-1), 5-1, (2-1)*(3-1), 7-1, (2-1)^(3-1), (3-1)^(2-1), (2-1)*(5-1), 11-1, (2-1)^(2-1)*(3-1)... Evaluate this modified product to yield a(n).
%p A141564 A := proc(n) local a,p,e,q,ifs ; if n = 1 then RETURN(0) ; fi; ifs := ifactors(n)[2] ; a := 1; for p in ifs do q := op(1,p)-1 ; if op(2,p) > 1 then e := op(2,p)-1 ; else e := 1 ; fi; a := a*q^e ; od: RETURN(a) ; end: for n from 1 to 120 do printf("%d,",A(n)) ; od: # _R. J. Mathar_, Aug 21 2008
%t A141564 f[{p_,e_}]:=If[e==1,p-1,(p-1)^(e-1)];a[n_]:=Times@@f/@FactorInteger[n];Array[a,81] (* _James C. McMahon_, Jul 26 2025 *)
%Y A141564 Cf. A000040, A002808.
%K A141564 nonn
%O A141564 1,3
%A A141564 _Juri-Stepan Gerasimov_, Aug 14 2008
%E A141564 Corrected and extended by _R. J. Mathar_, Aug 21 2008