login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A099751 Number of ways to write n as differences of (-4)-gonal numbers. If pe(n):=1/2*n*((e-2)*n+(4-e)) is the n-th e-gonal number, then a(n) = |{(m,k) of Z X Z; pe(-1)(m+k)-pe(m-1)=n}| for e=-4. cf. A001227 for e in {3, -2, 6}, A048272 for e in {0, 1, 4, 8} and A035218 for e=-1. 0
1, 0, 1, 1, 2, 0, 2, 2, 1, 0, 2, 1, 2, 0, 2, 3, 2, 0, 2, 2, 2, 0, 2, 2, 3, 0, 1, 2, 2, 0, 2, 4, 2, 0, 4, 1, 2, 0, 2, 4, 2, 0, 2, 2, 2, 0, 2, 3, 3, 0, 2, 2, 2, 0, 4, 4, 2, 0, 2, 2, 2, 0, 2, 5, 4, 0, 2, 2, 2, 0, 2, 2, 2, 0, 3, 2, 4, 0, 2, 6, 1, 0, 2, 2, 4, 0, 2, 4, 2, 0, 4, 2, 2, 0, 4, 4, 2, 0, 2, 3, 2, 0, 2, 4, 4 (list; graph; refs; listen; history; internal format)
OFFSET

1,5

FORMULA

Multiplicative with a(2^e) = e-1 if e>0, a(3^e) = 1, a(p^e) = e+1 if p>3.

Moebius transform is period 12 sequence [ 1, -1, 0, 1, 1, 0, 1, 1, 0, -1, 1, 0, ...].

G.f.: Sum_{k>0} (x^k - x^(2k) + x^(4k) + x^(5k) + x^(7k) + x^(8k) -x^(10k) + x^(11k)) / (1 - x^(12k)). - Michael Somos, Sep 20 2005

a(3*n) = a(n). a(4*n + 2) = 0. - Michael Somos, Nov 16 2011

EXAMPLE

x + x^3 + x^4 + 2*x^5 + 2*x^7 + 2*x^8 + x^9 + 2*x^11 + x^12 + 2*x^13 + ...

a(5)=2 because there two ways of differences: First pe(3)-pe(-2)=(-15)-(-20)=5 and second pe(1)-pe(2)=(1)-(-4)=5, for e=-4.

MAPLE

res:=1; ifac:=op(ifactors(i))[2]; for pfac in ifac do; if pfac[1]=2 then res:=res*(pfac[2]-1); else if pfac[1]<>3 then res:=res*(pfac[2]+1); fi; fi; od; a(i):=res;

PROG

(PARI) {a(n) = if( n<1, 0, if( n%2==0, (valuation(n, 2) -1) * a(n / 2^valuation(n, 2)), if( n%3==0, a(n / 3^valuation(n, 3)), numdiv(n)))) } /* Michael Somos, Sep 20 2005 */

(PARI) {a(n) = if( n<1, 0, (-1)^(n%4 == 0) * sumdiv( n, d, (-1)^(d\3) * kronecker( -3, d)))} /* Michael Somos, Nov 16 2011 */

CROSSREFS

Cf. A035218, A048272, A001227.

Sequence in context: A076880 A082115 A161553 * A159937 A058728 A143751

Adjacent sequences:  A099748 A099749 A099750 * A099752 A099753 A099754

KEYWORD

mult,easy,nonn

AUTHOR

Volker Schmitt (clamsi(AT)gmx.net), Nov 10 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 07:16 EST 2012. Contains 205589 sequences.