[go: up one dir, main page]

login
Revision History for A095874 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
a(n) = k if n = A000961(k) (powers of primes), a(n) = 0 if n is not in A000961.
(history; published version)
#31 by Joerg Arndt at Thu Jun 17 09:13:46 EDT 2021
STATUS

reviewed

approved

#30 by Michel Marcus at Wed Jun 16 23:41:25 EDT 2021
STATUS

proposed

reviewed

#29 by M. F. Hasler at Wed Jun 16 21:53:02 EDT 2021
STATUS

editing

proposed

Discussion
Wed Jun 16
23:24
Jon E. Schoenfield: I think it looks good!
#28 by M. F. Hasler at Wed Jun 16 21:52:56 EDT 2021
PROG

(PARI) {M95874=Map(); A095874(n, k)=if(mapisdefined(M95874, n, &k), k, isprimepower(n), mapput(M95874, n, k=sum(i=1, exponent(n), primepi(sqrtnint(n, i)))+1); k, n==1)} \\ Variant with memoization, possibly useful to compute A097621, A344826 and related. One may omit "isprimepower(n), " (possibly requiring factorization) and ", n==1" if n is known to be a power of a prime, i.e., to get a left inverse for A000961. - _M. F. Hasler_, Jun 15 2021

{M95874=Map(); A095874(n, k)=if(mapisdefined(M95874, n, &k), k, isprimepower(n), mapput(M95874, n, k=sum(i=1, exponent(n), primepi(sqrtnint(n, i)))+1); k, n==1)} \\ Variant with memoization, possibly useful to compute A097621, A344826 and related. "isprimepower(n), " (possibly requiring factorization) and ", n==1" can be omitted if n is known to be a power of a prime, i.e., to get a left inverse for A000961. - M. F. Hasler, Jun 15 2021

STATUS

proposed

editing

#27 by M. F. Hasler at Wed Jun 16 21:50:55 EDT 2021
STATUS

editing

proposed

#26 by M. F. Hasler at Wed Jun 16 21:50:16 EDT 2021
PROG

{M95874=Map(); A095874(n, k)=if(mapisdefined(M95874, n, &k), k, isprimepower(n), mapput(M95874, n, k=sum(i=1, exponent(n), primepi(sqrtnint(n, i)))+1); k, n==1)} \\ Variant with memoization, possibly useful to compute A097621, A344826 and related. "isprimepower(n), " (possibly requiring factorization) and ", n==1" can be omitted if n is known to be a prime power, of a prime, i.e., to get a left inverse for A000961. - M. F. Hasler, Jun 15 2021

STATUS

proposed

editing

#25 by M. F. Hasler at Wed Jun 16 21:44:02 EDT 2021
STATUS

editing

proposed

Discussion
Wed Jun 16
21:48
M. F. Hasler: Alternative (better?) NAME: "a(n) is the index of n in A000961 (powers of primes), or zero if n is not in A000961." or "...not a power of a prime." __________ 
What do you think?
#24 by M. F. Hasler at Wed Jun 16 21:41:03 EDT 2021
NAME

a(n) = k if n = A000961(k) (powers of primes), a(n) = 0 otherwiseif n is not in A000961.

STATUS

proposed

editing

Discussion
Wed Jun 16
21:44
M. F. Hasler: Jon, thanks for "otherwise", I still forget to fix this systematically. (But actually, in the case at hand, I finally think it's best to spell out what it means - "not ( n = A000961(k) )" is slightly misleading (it could mean that k is not chosen well, it should mean: there is no such k).
#23 by Jon E. Schoenfield at Wed Jun 16 20:26:18 EDT 2021
STATUS

editing

proposed

#22 by Jon E. Schoenfield at Wed Jun 16 20:26:16 EDT 2021
NAME

a(n) = k if n = A000961(k) (powers of primes), a(n) = 0 elseotherwise.

STATUS

proposed

editing