login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A317240 Number of representations of n of the form 1 + p1 * (1 + p2* ... * (1 + p_j)...), where [p1, ..., p_j] is a (possibly empty) list of (not necessarily distinct) primes. 4
1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 2, 0, 1, 2, 0, 2, 1, 2, 1, 3, 1, 1, 1, 1, 1, 2, 1, 2, 3, 2, 1, 4, 1, 3, 2, 0, 1, 2, 1, 3, 2, 1, 1, 3, 0, 2, 3, 2, 1, 3, 1, 3, 3, 1, 2, 4, 1, 2, 1, 3, 1, 2, 1, 2, 3, 2, 1, 3, 1, 4, 2, 2, 1, 3, 1, 4, 3, 2, 1, 5, 3, 3, 4, 0, 2, 2, 1, 3, 2, 2, 1, 5, 1, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,13
LINKS
FORMULA
a(n) = Sum_{prime p|(n-1)} a((n-1)/p) for n>1, a(1) = 1.
a(n) = 0 <=> n in { A180337 }.
a(n) >= A317241(n).
G.f. A(x) satisfies: A(x) = x * (1 + A(x^2) + A(x^3) + A(x^5) + ... + A(x^prime(k)) + ...). - Ilya Gutkovskiy, May 09 2019
EXAMPLE
a(13) = 2: 1 + 2 * (1 + 5) = 1 + 3 * (1 + 3) = 13.
a(31) = 3: 1 + 2 * (1 + 2 * (1 + 2 * (1 + 2))) = 1 + 3 * (1 + 3 * (1 + 2)) = 1 + 5 * (1 + 5) = 31.
MAPLE
a:= proc(n) option remember; `if`(n=1, 1,
add(a((n-1)/p), p=numtheory[factorset](n-1)))
end:
seq(a(n), n=1..200);
MATHEMATICA
pp[n_] := pp[n] = FactorInteger[n][[All, 1]];
q[n_] := q[n] = Switch[n, 1, True, 2, False, _, AnyTrue[pp[n-1], q[(n-1)/#]&]];
a[n_] := a[n] = Which[n == 1, 1, !q[n], 0, True, Sum[a[(n-1)/p], {p, pp[n-1]}]];
Array[a, 105] (* Jean-François Alcover, Jul 14 2021, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A366779 A326775 A349410 * A348444 A326620 A353372
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 24 2018
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 05:16 EDT 2024. Contains 371906 sequences. (Running on oeis4.)