login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A345699 Multiplicative with a(p) = a(p-1) and a(p^e) = a(p) + a(e) if e>1. 1
1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 3, 3, 2, 2, 4, 1, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 3, 2, 4, 4, 2, 2, 4, 4, 1, 1, 4, 4, 2, 2, 3, 2, 3, 3, 4, 4, 2, 4, 2, 2, 2, 2, 4, 4, 2, 2, 2, 4, 2, 2, 6, 2, 2, 2, 4, 4, 4, 3, 4, 2, 2, 2, 6, 3, 4, 4, 2, 6, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

Table of n, a(n) for n=1..87.

EXAMPLE

a(11)=a(10)=a(5)*a(2); a(2)=1; a(5)=a(4)=a(2)+a(2)=2; so a(11)=2.

MAPLE

a:= proc(n) option remember; mul(`if`(i[2]=1,

      a(i[1]-1), a(i[1])+a(i[2])), i=ifactors(n)[2])

    end:

seq(a(n), n=1..100);  # Alois P. Heinz, Jun 28 2021

MATHEMATICA

a[1]=1; a[p_, 1]:= a[p-1]; a[p_, s_] := a[p, s] =  a[p] + a[s];

a[n_]:=a[n]=Module[{aux=FactorInteger[n]}, Product[a[aux[[i, 1]], aux[[i, 2]]], {i, Length[aux]}]];

PROG

(PARI) a(n) = my(f=factor(n)); for (k=1, #f~, f[k, 1] = a(f[k, 1]-1); if (f[k, 2] > 1, f[k, 1] += a(f[k, 2])); f[k, 2] = 1); factorback(f); \\ Michel Marcus, Jun 26 2021

CROSSREFS

Cf. A343068, A345763.

Sequence in context: A254687 A182590 A047846 * A212632 A025885 A198337

Adjacent sequences:  A345696 A345697 A345698 * A345700 A345701 A345702

KEYWORD

nonn,mult

AUTHOR

José María Grau Ribas, Jun 24 2021

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 6 13:05 EST 2021. Contains 349563 sequences. (Running on oeis4.)