login
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

%I #26 Nov 14 2016 03:26:05

%S 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,

%T 47,74,46,75,105,74,42,75,109,74,110,147,109,70,110,151,109,152,196,

%U 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

%N 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 + + - - + + -.

%C 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).

%D Ed Pegg, Jr., Posting to Math Fun Mailing List, Aug 26 2015

%H Wolfram Demonstrations Project, <a href="http://demonstrations.wolfram.com/SemigracefulEulerianGraphs/">Semigraceful Eulerian Graphs</a>

%H <a href="/index/Rec#order_15">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,2,-2,0,0,0,0,0,-1,1).

%F 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

%e The first differences are

%e 1, 2, -3, -4, 5, 6, -7,

%e 8, 9, -10, -11, 12, 13, -14,

%e 15, 16, -17, -18, 19, 20, -21,

%e 22, 23, -24, -25, 26, 27, -28,

%e ...

%t FoldList[Plus,4,Flatten[Table[{1,1,-1,-1,1,1,-1}, {20}]] Range[140]]

%o (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

%K nonn,easy

%O 0,1

%A _N. J. A. Sloane_, Aug 27 2015