login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

Alois P. Heinz, Table of n, a(n) for n = 1..65536

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

Cf. A180337, A317241, A317384.

Sequence in context: A120698 A338411 A326775 * A326620 A305501 A184170

Adjacent sequences:  A317237 A317238 A317239 * A317241 A317242 A317243

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 4 05:02 EDT 2021. Contains 346442 sequences. (Running on oeis4.)