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!)
A175940 Number of ways of writing n=p+f with p a prime and f a factorial. 5
0, 0, 1, 2, 1, 1, 1, 2, 2, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 2, 1, 2, 1, 1, 0, 2, 0, 2, 1, 1, 0, 1, 1, 3, 1, 1, 0, 2, 1, 2, 0, 0, 0, 2, 1, 2, 0, 0, 0, 1, 1, 2, 1, 1, 0, 2, 0, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 2, 0, 1, 1, 1, 0, 1, 1, 3, 0, 0, 0, 1, 1, 2, 0, 0, 0, 2, 0, 1, 1, 1, 0, 0, 1, 3, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

COMMENTS

Number of partitions of n into the sum of a prime number and a factorial number. Number of decompositions of n into an unordered sum of a prime number and a factorial number.

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

EXAMPLE

a(29)=2 because 29 has two prime + factorial representations, 5+4! and 23+3!.

MAPLE

a:= proc(n) local t, k;

       t:= 0;

       for k while k! < n do

         if isprime(n-k!) then t:= t+1 fi

       od;

       t

end proc:

seq(a(n), n=1..100); # Robert Israel, Oct 13 2014

PROG

(PARI)

a(n) = c=0; for(i=1, n, if(isprime(n-i!), c++)); c

vector(100, n, a(n)) \\ Derek Orr, Oct 13 2014

CROSSREFS

Cf. A000142, A062602, A175931, A175933.

Sequence in context: A284463 A169758 A175933 * A299236 A037827 A086074

Adjacent sequences:  A175937 A175938 A175939 * A175941 A175942 A175943

KEYWORD

nonn

AUTHOR

Juri-Stepan Gerasimov, Oct 25 2010

EXTENSIONS

Edited and entries checked by D. S. McNeil, Nov 26 2010

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 May 15 04:50 EDT 2021. Contains 343909 sequences. (Running on oeis4.)