A100994 If n is a prime power p^m, m >= 1, then n, otherwise 1.
1, 2, 3, 4, 5, 1, 7, 8, 9, 1, 11, 1, 13, 1, 1, 16, 17, 1, 19, 1, 1, 1, 23, 1, 25, 1, 27, 1, 29, 1, 31, 32, 1, 1, 1, 1, 37, 1, 1, 1, 41, 1, 43, 1, 1, 1, 47, 1, 49, 1, 1, 1, 53, 1, 1, 1, 1, 1, 59, 1, 61, 1, 1, 64, 1, 1, 67, 1, 1, 1, 71, 1, 73, 1, 1, 1, 1, 1, 79, 1, 81, 1, 83, 1, 1, 1, 1, 1, 89, 1, 1
Offset: 1
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
A100994[1]:=1; A100994[n_] := (n-1)*(Floor[1/PrimeNu[n]])+1; Array[A100994,100] (* Enrique Pérez Herrero, Sep 24 2011 *) a[n_] := If[PrimePowerQ[n], n, 1]; Array[a, 100] (* Jean-François Alcover, Mar 26 2020 *)
-
PARI
a(n) = if (isprimepower(n), n, 1); \\ Michel Marcus, Mar 18 2018
Formula
Extensions
Definition edited to remove ambiguity by Daniel Forgues, Aug 18 2009
Comments