A040005
Continued fraction for sqrt(8).
Original entry on oeis.org
2, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4
Offset: 0
2.828427124746190097603377448... = 2 + 1/(1 + 1/(4 + 1/(1 + 1/(4 + ...)))). - _Harry J. Smith_, Jun 02 2009
- James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 276.
-
Digits := 100: convert(evalf(sqrt(N)),confrac,90,'cvgts'):
-
ContinuedFraction[Sqrt[8],300] (* Vladimir Joseph Stephan Orlovsky, Mar 04 2011 *)
-
{ allocatemem(932245000); default(realprecision, 16000); x=contfrac(sqrt(8)); for (n=0, 20000, write("b040005.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 02 2009
A094015
Expansion of (1+4*x)/(1-8*x^2).
Original entry on oeis.org
1, 4, 8, 32, 64, 256, 512, 2048, 4096, 16384, 32768, 131072, 262144, 1048576, 2097152, 8388608, 16777216, 67108864, 134217728, 536870912, 1073741824, 4294967296, 8589934592, 34359738368, 68719476736, 274877906944
Offset: 0
-
a094015 = sum . a152842_row -- Reinhard Zumkeller, May 01 2014
-
[2*8^Floor((n-1)/2)*(3+(-1)^n): n in [0..30]]; // G. C. Greubel, Nov 22 2021
-
a:=n->mul(3-(-1)^j,j=1..n):seq(a(n),n=0..25); # Zerinvary Lajos, Dec 13 2008
-
Table[8^Floor[n/2]*Mod[4^n, 5], {n, 0, 30}] (* G. C. Greubel, Nov 22 2021 *)
-
[8^(n//2)*(4^n%5) for n in (0..30)] # G. C. Greubel, Nov 22 2021
A010698
Period 2: repeat (2,8).
Original entry on oeis.org
2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2, 8, 2
Offset: 0
-
A010698:=n->5-3*(-1)^n; seq(A010698(n), n=0..100); # Wesley Ivan Hurt, Mar 26 2014
-
Table[5-3(-1)^n, {n, 0, 100}] (* Wesley Ivan Hurt, Mar 26 2014 *)
PadRight[{},120,{2,8}] (* Harvey P. Dale, Oct 31 2016 *)
-
A010698(n):=if evenp(n) then 2 else 8$
makelist(A010698(n),n,0,30); /* Martin Ettl, Nov 09 2012 */
-
a(n)=n%2*6+2 \\ Charles R Greathouse IV, Jun 11 2015
A274913
Square array read by antidiagonals upwards in which each new term is the least positive integer distinct from its neighbors.
Original entry on oeis.org
1, 2, 3, 1, 4, 1, 2, 3, 2, 3, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 1, 4, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 2, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3
Offset: 1
The corner of the square array begins:
1, 3, 1, 3, 1, 3, 1, 3, 1, 3, ...
2, 4, 2, 4, 2, 4, 2, 4, 2, ...
1, 3, 1, 3, 1, 3, 1, 3, ...
2, 4, 2, 4, 2, 4, 2, ...
1, 3, 1, 3, 1, 3, ...
2, 4, 2, 4, 2, ...
1, 3, 1, 3, ...
2, 4, 2, ...
1, 3, ...
2, ...
...
The sequence written as a triangle begins:
1;
2, 3;
1, 4, 1;
2, 3, 2, 3;
1, 4, 1, 4, 1;
2, 3, 2, 3, 2, 3;
1, 4, 1, 4, 1, 4, 1;
2, 3, 2, 3, 2, 3, 2, 3;
1, 4, 1, 4, 1, 4, 1, 4, 1;
2, 3, 2, 3, 2, 3, 2, 3, 2, 3;
...
-
Table[1 + Boole@ EvenQ@ # + 2 Boole@ EvenQ@ k &[n - k + 1], {n, 14}, {k, n}] // Flatten (* Michael De Vlieger, Nov 14 2016 *)
A283393
a(n) = gcd(n^2-1, n^2+9).
Original entry on oeis.org
1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10, 1, 10, 1, 2, 5, 2, 5, 2, 1, 10
Offset: 0
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,1).
-
&cat [[1, 10, 1, 2, 5, 2, 5, 2, 1, 10]^^10];
-
Table[PolynomialGCD[n^2 - 1, n^2 + 9], {n, 0, 100}]
LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {1, 10, 1, 2, 5, 2, 5, 2, 1, 10}, 100]
-
makelist(gcd(n^2-1, n^2+9), n, 0, 100);
-
Vec((1 + 10*x + x^2 + 2*x^3 + 5*x^4 + 2*x^5 + 5*x^6 + 2*x^7 + x^8 + 10*x^9)/(1 - x^10) + O(x^100)) \\ Colin Barker, Mar 08 2017
-
[1, 10, 1, 2, 5, 2, 5, 2, 1, 10]*10
-
[gcd(n^2-1, n^2+9) for n in range(100)]
A083589
Expansion of 1/((1-4*x)*(1-x^4)).
Original entry on oeis.org
1, 4, 16, 64, 257, 1028, 4112, 16448, 65793, 263172, 1052688, 4210752, 16843009, 67372036, 269488144, 1077952576, 4311810305, 17247241220, 68988964880, 275955859520, 1103823438081, 4415293752324, 17661175009296, 70644700037184
Offset: 0
-
CoefficientList[Series[1/((1-4x)(1-x^4)),{x,0,30}],x] (* or *) LinearRecurrence[ {4,0,0,1,-4},{1,4,16,64,257},31] (* Harvey P. Dale, Sep 13 2011 *)
-
a(n)=(4^(n+4)+64)\255 \\ Charles R Greathouse IV, Jul 09 2013
A166517
a(n) = (3 + 5*(-1)^n + 6*n)/4.
Original entry on oeis.org
2, 1, 5, 4, 8, 7, 11, 10, 14, 13, 17, 16, 20, 19, 23, 22, 26, 25, 29, 28, 32, 31, 35, 34, 38, 37, 41, 40, 44, 43, 47, 46, 50, 49, 53, 52, 56, 55, 59, 58, 62, 61, 65, 64, 68, 67, 71, 70, 74, 73, 77, 76, 80, 79, 83, 82, 86, 85, 89, 88, 92, 91, 95, 94, 98, 97, 101, 100, 104, 103, 107
Offset: 0
-
[(3 +5*(-1)^n+6*n)/4: n in [0..80]]; // Vincenzo Librandi, Sep 13 2013
-
CoefficientList[Series[(2 x^2 - x + 2)/((1 + x) (x - 1)^2), {x, 0, 80}], x] (* Harvey P. Dale, Mar 25 2011 *)
Table[(3 + 5 (-1)^n + 6 n) / 4, {n, 0, 100}] (* Vincenzo Librandi, Sep 13 2013 *)
A140359
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3).
Original entry on oeis.org
1, 1, 6, 11, 26, 51, 106, 211, 426, 851, 1706, 3411, 6826, 13651, 27306, 54611, 109226, 218451, 436906, 873811, 1747626, 3495251, 6990506, 13981011, 27962026, 55924051, 111848106, 223696211, 447392426, 894784851, 1789569706, 3579139411
Offset: 0
-
[(5*2^(n+1) -9 + 5*(-1)^n)/6: n in [0..50]]; // G. C. Greubel, Oct 10 2017
-
Table[(5*2^(n+1) -9 + 5*(-1)^n)/6, {n, 0, 50}] (* G. C. Greubel, Oct 10 2017 *)
LinearRecurrence[{2,1,-2},{1,1,6},40] (* Harvey P. Dale, Mar 24 2021 *)
-
for(n=0,50, print1((5*2^(n+1) -9 + 5*(-1)^n)/6, ", ")) \\ G. C. Greubel, Oct 10 2017
A171478
a(n) = 6*a(n-1) - 8*a(n-2) + 2 for n > 1; a(0) = 1, a(1) = 8.
Original entry on oeis.org
1, 8, 42, 190, 806, 3318, 13462, 54230, 217686, 872278, 3492182, 13974870, 55911766, 223671638, 894735702, 3579041110, 14316361046, 57265837398, 229064136022, 916258116950, 3665035613526, 14660148745558, 58640607565142
Offset: 0
-
a:=[1,8];; for n in [3..25] do a[n]:=6*a[n-1]-8*a[n-2]+2; od; a; # Muniru A Asiru, Mar 22 2018
-
[(10*4^n-9*2^n+2)/3: n in [0..30]]; // Vincenzo Librandi, Jul 18 2011
-
a:= proc(n) option remember: if n = 0 then 1 elif n = 1 then 8 elif n >= 2 then 6*procname(n-1) - 8*procname(n-2) + 2 fi; end:
seq(a(n), n = 0..25); # Muniru A Asiru, Mar 22 2018
-
RecurrenceTable[{a[0]==1,a[1]==8,a[n]==6a[n-1]-8a[n-2]+2},a,{n,30}] (* or *) LinearRecurrence[{7,-14,8},{1,8,42},30] (* Harvey P. Dale, May 04 2012 *)
-
{m=23; v=concat([1, 8], vector(m-2)); for(n=3, m, v[n]=6*v[n-1]-8*v[n-2]+2); v}
A174571
a(4n)=n, a(4n+1)=4, a(4n+2)=1, a(4n+3)=4.
Original entry on oeis.org
0, 4, 1, 4, 1, 4, 1, 4, 2, 4, 1, 4, 3, 4, 1, 4, 4, 4, 1, 4, 5, 4, 1, 4, 6, 4, 1, 4, 7, 4, 1, 4, 8, 4, 1, 4, 9, 4, 1, 4, 10, 4, 1, 4, 11, 4, 1, 4, 12, 4, 1, 4, 13, 4, 1, 4, 14, 4, 1, 4, 15, 4, 1, 4, 16, 4, 1, 4, 17, 4, 1, 4, 18, 4, 1, 4, 19, 4, 1, 4, 20, 4, 1, 4
Offset: 0
- Antti Karttunen, Table of n, a(n) for n = 0..16383
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,2,0,0,0,-1).
-
[(n mod 4) eq 0 select n/4 else Modexp(4,n,5): n in [0..90]]; // G. C. Greubel, Nov 23 2021
-
Array[Which[OddQ@ Mod[#, 4], 4, Mod[#, 4] == 0, #/4, True, 1] &, 84, 0] (* or *)
CoefficientList[Series[x*(4 +x +4*x^2 +x^3 -4*x^4 -x^5 -4*x^6)/(1-x^4)^2, {x, 0, 83}], x] (* Michael De Vlieger, Nov 06 2018 *)
LinearRecurrence[{0,0,0,2,0,0,0,-1},{0,4,1,4,1,4,1,4},100] (* Harvey P. Dale, Dec 21 2024 *)
-
A174571(n) = if(!(n%4),n/4,if(2==(n%4),1,4)); \\ Antti Karttunen, Nov 06 2018
-
def A174571(n): return n/4 if (n%4==0) else power_mod(4,n,5)
[A174571(n) for n in (0..90)] # G. C. Greubel, Nov 23 2021
Comments