login
A261418
The UUDDUUD sequence, or the 3/7 sequence: start with 4, then successively add or subtract the integers 1,2,3,..., using the repeating sign pattern + + - - + + -.
0
4, 5, 7, 4, 0, 5, 11, 4, 12, 21, 11, 0, 12, 25, 11, 26, 42, 25, 7, 26, 46, 25, 47, 70, 46, 21, 47, 74, 46, 75, 105, 74, 42, 75, 109, 74, 110, 147, 109, 70, 110, 151, 109, 152, 196, 151, 105, 152, 200, 151, 201, 252, 200, 147, 201, 256, 200, 257, 315, 256, 196, 257, 319, 256, 320, 385, 319, 252, 320, 389, 319, 390, 462, 389, 315, 390, 466, 389, 467, 546, 466, 385, 467, 550, 466, 551, 637, 550, 462, 551, 641, 550
OFFSET
0,1
COMMENTS
Each numbers appears two or three times. Only 3/7 of the integers appear, namely 7 times the triangular numbers plus (0,4,5) or (5,4,0).
REFERENCES
Ed Pegg, Jr., Posting to Math Fun Mailing List, Aug 26 2015
LINKS
Wolfram Demonstrations Project, Semigraceful Eulerian Graphs
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,2,-2,0,0,0,0,0,-1,1).
FORMULA
G.f.: ( -4-x -2*x^2 +3*x^3 -5*x^5 -6*x^6 +15*x^7 -6*x^8 -5*x^9 +4*x^10 -2*x^12 -x^13 +4*x^4 +3*x^11 -4*x^14 ) / ( (x^6+x^5+x^4+x^3+x^2+x+1)^2 *(x-1)^3 ). - R. J. Mathar, Jul 27 2016
EXAMPLE
The first differences are
1, 2, -3, -4, 5, 6, -7,
8, 9, -10, -11, 12, 13, -14,
15, 16, -17, -18, 19, 20, -21,
22, 23, -24, -25, 26, 27, -28,
...
MATHEMATICA
FoldList[Plus, 4, Flatten[Table[{1, 1, -1, -1, 1, 1, -1}, {20}]] Range[140]]
PROG
(PARI) a(n)=([0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0; 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0; 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0; 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0; 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0; 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0; 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0; 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0; 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0; 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1; 1, -1, 0, 0, 0, 0, 0, -2, 2, 0, 0, 0, 0, 0, 1]^n*[4; 5; 7; 4; 0; 5; 11; 4; 12; 21; 11; 0; 12; 25; 11])[1, 1] \\ Charles R Greathouse IV, Sep 01 2015
CROSSREFS
Sequence in context: A272005 A274984 A114343 * A011457 A016720 A104140
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Aug 27 2015
STATUS
approved