cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A054432 a(n) = Sum_{1<=k<=n, gcd(k,n)=1} 2^(k-1).

Original entry on oeis.org

1, 1, 3, 5, 15, 17, 63, 85, 219, 325, 1023, 1105, 4095, 5397, 13515, 21845, 65535, 70737, 262143, 333125, 890523, 1397077, 4194303, 4527185, 16236015, 22365525, 57521883, 88429845, 268435455, 272962625, 1073741823, 1431655765, 3679302363, 5726557525
Offset: 1

Views

Author

Keywords

Comments

For n>0, numbers formed by interpreting the reduced residue set of n (the rows of triangle A054431) as binary numbers.

Examples

			For n=6 we have k = 1 and 5 and then 2^0 + 2^4 = 17 = a(6).
		

Crossrefs

Programs

  • Maple
    rrs2bincode := proc(n) local i,z; z := 0; for i from 1 to n-1 do z := z*2; if (1 = igcd(n,i)) then z := z + 1; fi; od; RETURN(z); end;
  • Mathematica
    f[n_] := Sum[2^k, {k, Select[ Range@ n, GCD[#, n] == 1 &] - 1}]; Array[f, 35] (* Robert G. Wilson v, Jul 21 2014 *)
  • PARI
    a(n) = sum(k=1, n, if (gcd(k,n)==1, 2^(k-1), 0)); \\ Michel Marcus, Jul 20 2014
    
  • PARI
    a(n) = subst(Polrev(vector(n, i, gcd(n, i)==1)), x, 2); \\ Michel Marcus, Jul 21 2014

Formula

M * V, where M = A054521 is an infinite lower triangular matrix and V = [1, 2, 4, 8, ...] is a vector. - Gary W. Adamson, Jan 13 2007
a(4*n) = (2^(2*n) + 1)*a(2*n) [think how the reduced residue set of the numbers of the form 4n are formed].
For all primes p and integers e > 1, A054432(p^e) = A019320(p^e)*(((2^(p^(e-1)))-1)* ((2^(p-1))-1))/((2^p)-1).
a(n-1) = Sum_{k=1..n, gcd(n, k) = 1} 2^(k-1). - Vladeta Jovovic, Aug 15 2002

Extensions

Edited by N. J. A. Sloane, Jul 03 2008 at the suggestion of R. J. Mathar
More terms from Michel Marcus, Jul 20 2014

A051258 Fibocyclotomic numbers: numbers formed from cyclotomic polynomials and Fibonacci numbers (A000045).

Original entry on oeis.org

1, 1, 1, 2, 1, 7, 0, 20, 3, 10, 1, 143, 2, 376, 4, 11, 21, 2583, 6, 6764, 15, 74, 33, 46367, 18, 7435, 88, 2618, 104, 832039, 25, 2178308, 987, 3399, 609, 20160, 136, 39088168, 1596, 23228, 861, 267914295, 182, 701408732, 4895, 35920, 10945, 4807526975
Offset: 0

Views

Author

Antti Karttunen, Oct 24 1999

Keywords

Comments

For all primes p, a(p) = fib(p+1)-1 and for all n of the form 2^i*p^j (where p is an odd prime and i >= 0 and j >= 2) fib(p)|a(2^i*p^j).
a(0) depends on how the zeroth cyclotomic polynomial is defined.

Examples

			a(22) = fib(10)-fib(9)+fib(8)-fib(7)+fib(6)-fib(5)+fib(4)-fib(3)+fib(2)-fib(1) = 33 as the 22nd cyclotomic polynomial is x^10-x^9+x^8-x^7+x^6-x^5+x^4-x^3+x^2-x+1 (The constant term does not affect the result, as fib(0)=0.)
		

Crossrefs

Programs

  • Maple
    get_coefficient := proc(e); if(1 = nops(e)) then if(`integer` = op(0,e)) then RETURN(e); else RETURN(1); fi; else if(2 = nops(e)) then if(`*` = op(0,e)) then RETURN(op(1,e)); else RETURN(1); fi; else RETURN(`Cannot find coefficient!`); fi; fi; end;
    get_exponent := proc(e); if((1 = e) or (-1 = e)) then RETURN(0); else if(1 = nops(e)) then RETURN(1); else if(2 = nops(e)) then if(`^` = op(0,e)) then RETURN(op(2,e)); else RETURN(get_exponent(op(2,e))); fi; else RETURN(`Cannot find exponent!`); fi; fi; fi; end;
    fibo_cyclotomic := proc(j) local i,p; p := sort(cyclotomic(j,x)); RETURN(add((get_coefficient(op(i,p))*fibonacci(get_exponent(op(i,p)))),i=1..nops(p))); end;
  • Mathematica
    f[n_]:=Module[{cy=CoefficientList[Cyclotomic[n,x],x]},Total[ Times@@@ Thread[ {Fibonacci[ Range[0, Length[cy]- 1]],cy}]]]; Join[{1},Array[f,50]] (* Harvey P. Dale, Oct 02 2011 *)
  • PARI
    a(n)=my(P=polcyclo(n));sum(i=1,poldegree(P),polcoeff(P,i)*fibonacci(i)) \\ Charles R Greathouse IV, Jan 05 2013

Formula

a(n) = Sum (coefficient_of_term_i_of_cp_n times Fib(exponent_of_term_i_of_cp_n)), i=1..degree of cp_n, where cp_n is the n-th cyclotomic polynomial.

A048757 Sum_{i=0..2n} (C(2n,i) mod 2)*Fibonacci(i+2) = Sum_{i=0..n} (C(n,i) mod 2)*Fibonacci(2i+2).

Original entry on oeis.org

1, 4, 9, 33, 56, 203, 441, 1596, 2585, 9353, 20304, 73461, 124033, 448756, 974169, 3524577, 5702888, 20633243, 44791065, 162055596, 273617239, 989956471, 2149017696, 7775219067, 12591974497, 45558191716, 98898651657
Offset: 0

Views

Author

Antti Karttunen, Jul 13 1999

Keywords

Comments

The history of 1-D CA Rule 90 starting from the seed pattern 1 interpreted as Zeckendorffian expansion.
Also, product of distinct terms of A001566 and appropriate Fibonacci or Lucas numbers: a(n) = FL(n+2)Product(L(2^i)^bit(n,i),i=0..) Here L(2^i) = A001566 and FL(n) = n-th Fibonacci number if n even, n-th Lucas number if n odd. bit(n,i) is the i-th digit (0 or 1) in the binary expansion of n, with the least significant digit being bit(n,0).

Examples

			1 = Fib(2) = 1;
101 = Fib(4) + Fib(2) = 3 + 1 = 4;
10001 = Fib(6) + Fib(2) = 8 + 1 = 9;
1010101 = Fib(8) + Fib(6) + Fib(4) + Fib(2) = 21 + 8 + 3 + 1 = 33; etc.
		

Crossrefs

a(n) = A022290(A038183(n)) = A022290(A048723(5, n)) = A003622(A051656(n)) = A075148(n, 2)*A050613(n). Third row of A050609, third column of A050610.
Cf. A054433.

Programs

  • Mathematica
    Table[Sum[Mod[Binomial[2n, i], 2] Fibonacci[i + 2], {i, 0, 2n}], {n, 0, 19}] (* Alonso del Arte, Apr 27 2014 *)

A063683 Integers formed from the reduced residue sets of even numbers and Fibonacci numbers.

Original entry on oeis.org

1, 3, 6, 21, 50, 108, 364, 987, 1938, 6150, 17622, 34776, 121160, 306852, 549000, 2178309, 5701290, 11197764, 39083988, 93031050, 191708244, 697884066, 1836283246, 3605645232, 11442062750, 32888033880, 64700678454
Offset: 1

Views

Author

Antti Karttunen, Jul 31 2001

Keywords

Comments

a(2n) = L(2n)*a(n), where L(2n) is the 2n-th Lucas number = A000032(2n).

Examples

			The reduced residue set of 2*6 = 12 is {1,5,7,11}, thus a(6) = F_1 + F_5 + F_7 + F_11 = 108.
		

Crossrefs

Programs

  • Maple
    A063683 := [seq(A063683_as_sum(2*n), n=1..101)]; A063683_as_sum := proc(n) local i; RETURN(add((one_or_zero(igcd(n,i))*fibonacci(i)),i=1..(n-1))); end; Yours, Antti Karttunen

Formula

a(n) = Sum_{i | gcd(i, 2n)=1} Fib(i) (where Fib(i) = A000045[i])
Showing 1-4 of 4 results.