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-10 of 12 results. Next

A101119 Nonzero differences of A006519 (highest power of 2 dividing n) and A003484 (Radon function).

Original entry on oeis.org

7, 22, 7, 52, 7, 22, 7, 112, 7, 22, 7, 52, 7, 22, 7, 239, 7, 22, 7, 52, 7, 22, 7, 112, 7, 22, 7, 52, 7, 22, 7, 494, 7, 22, 7, 52, 7, 22, 7, 112, 7, 22, 7, 52, 7, 22, 7, 239, 7, 22, 7, 52, 7, 22, 7, 112, 7, 22, 7, 52, 7, 22, 7, 1004, 7, 22, 7, 52, 7, 22, 7, 112, 7, 22, 7, 52, 7, 22, 7, 239
Offset: 1

Views

Author

Simon Plouffe and Paul D. Hanna, Dec 02 2004

Keywords

Comments

A006519 and A003484 differ only at every 16th term; this sequence forms the nonzero differences. Records form A101120. Equals the XOR BINOMIAL transform of A101122.

Crossrefs

Programs

  • Magma
    [2^Valuation(16*n,2) - 8*Floor(Valuation(16*n,2)/4) - 2^(Valuation(16*n,2) mod 4): n in [1..50]]; // G. C. Greubel, Nov 01 2018
    
  • Mathematica
    Table[2^(IntegerExponent[16*n, 2]) - 8*Floor[IntegerExponent[16*n, 2]/4] - 2^(Mod[IntegerExponent[16*n, 2], 4]), {n, 1, 50}] (* G. C. Greubel, Nov 01 2018 *)
  • PARI
    {a(n)=2^valuation(16*n,2)-(8*(valuation(16*n,2)\4)+2^(valuation(16*n,2)%4))}
    
  • Python
    def A101119(n): return (1<<(m:=(~n&n-1).bit_length()+4))-((m&-4)<<1)-(1<<(m&3)) # Chai Wah Wu, Jul 10 2022

Formula

a(n) = A006519(16*n) - A003484(16*n) for n>=1. a(2*n-1) = 7 for n>=1.

A209675 Radon function at even positions: a(n) = A003484(2*n).

Original entry on oeis.org

2, 4, 2, 8, 2, 4, 2, 9, 2, 4, 2, 8, 2, 4, 2, 10, 2, 4, 2, 8, 2, 4, 2, 9, 2, 4, 2, 8, 2, 4, 2, 12, 2, 4, 2, 8, 2, 4, 2, 9, 2, 4, 2, 8, 2, 4, 2, 10, 2, 4, 2, 8, 2, 4, 2, 9, 2, 4, 2, 8, 2, 4, 2, 16, 2, 4, 2, 8, 2, 4, 2, 9, 2, 4, 2, 8, 2, 4, 2, 10, 2, 4, 2, 8, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 11 2012

Keywords

Crossrefs

Programs

  • Haskell
    a209675 = a003484 . (* 2)
  • Mathematica
    a[n_] := 8*Floor[(e = IntegerExponent[n, 2] + 1)/4] + 2^Mod[e, 4]; Array[a, 100] (* Amiram Eldar, Nov 29 2022 *)

Formula

a(n) = A053381(n-1) + 1.
a(n) > 1.
a(A005408(n)) = 2; a(A016825(n)) = 4; a(A017113(n)) = 8; a(A051062(n)) = 9.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 4/3. - Amiram Eldar, Nov 29 2022

A101120 Records in A101119, which forms the nonzero differences of A006519 and A003484.

Original entry on oeis.org

7, 22, 52, 112, 239, 494, 1004, 2024, 4071, 8166, 16356, 32736, 65503, 131038, 262108, 524248, 1048535, 2097110, 4194260, 8388560, 16777167, 33554382, 67108812, 134217672, 268435399, 536870854, 1073741764, 2147483584, 4294967231, 8589934526, 17179869116, 34359738296
Offset: 1

Views

Author

Simon Plouffe and Paul D. Hanna, Dec 02 2004

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3,-2,0,1,-3,2},{7,22,52,112,239,494},30] (* Harvey P. Dale, Jan 23 2023 *)
  • PARI
    a(n)=2^(n+3)-2^((n-1)%4)-8*((n+3)\4)
    
  • Python
    def A101120(n): return (1<<(n+3))-(1<<((n-1)&3))-(((n+3)&-4)<<1) # Chai Wah Wu, Jul 10 2022

Formula

a(n) = A101119(2^(n-1)) for n>=1.
a(n) = 2^(n+3) - 2^((n-1)(mod 4)) - 8*floor((n+3)/4).
a(n) = 2^(n+3) - A003485(n+3). - Johannes W. Meijer, Oct 31 2012
From Chai Wah Wu, Apr 15 2017: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) + a(n-4) - 3*a(n-5) + 2*a(n-6) for n > 6.
G.f.: x*(-x - 7)/((x - 1)^2*(x + 1)*(2*x - 1)*(x^2 + 1)). (End)
E.g.f.: (exp(x)*(32*exp(x) - 8*x - 27) - 4*cos(x) - cosh(x) - 2*sin(x) + sinh(x))/4. - Stefano Spezia, Jun 06 2023

A006519 Highest power of 2 dividing n.

Original entry on oeis.org

1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 16, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 32, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 16, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 64, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 16, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 32, 1, 2, 1, 4, 1, 2
Offset: 1

Views

Author

Keywords

Comments

Least positive k such that m^k + 1 divides m^n + 1 (with fixed base m). - Vladimir Baltic, Mar 25 2002
To construct the sequence: start with 1, concatenate 1, 1 and double last term gives 1, 2. Concatenate those 2 terms, 1, 2, 1, 2 and double last term 1, 2, 1, 2 -> 1, 2, 1, 4. Concatenate those 4 terms: 1, 2, 1, 4, 1, 2, 1, 4 and double last term -> 1, 2, 1, 4, 1, 2, 1, 8, etc. - Benoit Cloitre, Dec 17 2002
a(n) = gcd(seq(binomial(2*n, 2*m+1)/2, m = 0 .. n - 1)) (odd numbered entries of even numbered rows of Pascal's triangle A007318 divided by 2), where gcd() denotes the greatest common divisor of a set of numbers. Due to the symmetry of the rows it suffices to consider m = 0 .. floor((n-1)/2). - Wolfdieter Lang, Jan 23 2004
Equals the continued fraction expansion of a constant x (cf. A100338) such that the continued fraction expansion of 2*x interleaves this sequence with 2's: contfrac(2*x) = [2; 1, 2, 2, 2, 1, 2, 4, 2, 1, 2, 2, 2, 1, 2, 8, 2, ...].
Simon Plouffe observes that this sequence and A003484 (Radon function) are very similar, the difference being all zeros except for every 16th term (see A101119 for nonzero differences). Dec 02 2004
This sequence arises when calculating the next odd number in a Collatz sequence: Next(x) = (3*x + 1) / A006519, or simply (3*x + 1) / BitAnd(3*x + 1, -3*x - 1). - Jim Caprioli, Feb 04 2005
a(n) = n if and only if n = 2^k. This sequence can be obtained by taking a(2^n) = 2^n in place of a(2^n) = n and using the same sequence building approach as in A001511. - Amarnath Murthy, Jul 08 2005
Also smallest m such that m + n - 1 = m XOR (n - 1); A086799(n) = a(n) + n - 1. - Reinhard Zumkeller, Feb 02 2007
Number of 1's between successive 0's in A159689. - Philippe Deléham, Apr 22 2009
Least number k such that all coefficients of k*E(n, x), the n-th Euler polynomial, are integers (cf. A144845). - Peter Luschny, Nov 13 2009
In the binary expansion of n, delete everything left of the rightmost 1 bit. - Ralf Stephan, Aug 22 2013
The equivalent sequence for partitions is A194446. - Omar E. Pol, Aug 22 2013
Also the 2-adic value of 1/n, n >= 1. See the Mahler reference, definition on p. 7. This is a non-archimedean valuation. See Mahler, p. 10. Sometimes called 2-adic absolute value of 1/n. - Wolfdieter Lang, Jun 28 2014
First 2^(k-1) - 1 terms are also the heights of the successive rectangles and squares of width 2 that are adjacent to any of the four sides of the toothpick structure of A139250 after 2^k stages, with k >= 2. For example: if k = 5 the heights after 32 stages are [1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1] respectively, the same as the first 15 terms of this sequence. - Omar E. Pol, Dec 29 2020

Examples

			2^3 divides 24, but 2^4 does not divide 24, so a(24) = 8.
2^0 divides 25, but 2^1 does not divide 25, so a(25) = 1.
2^1 divides 26, but 2^2 does not divide 26, so a(26) = 2.
Per _Marc LeBrun_'s 2000 comment, a(n) can also be determined with bitwise operations in two's complement. For example, given n = 48, we see that n in binary in an 8-bit byte is 00110000 while -n is 11010000. Then 00110000 AND 11010000 = 00010000, which is 16 in decimal, and therefore a(48) = 16.
G.f. = x + 2*x^2 + x^3 + 4*x^4 + x^5 + 2*x^6 + x^7 + 8*x^8 + x^9 + ...
		

References

  • Kurt Mahler, p-adic numbers and their functions, second ed., Cambridge University Press, 1981.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Partial sums are in A006520, second partial sums in A022560.
Sequences used in definitions of this sequence: A000079, A001511, A004198, A007814.
Sequences with related definitions: A038712, A171977, A135481 (GS(1, 6)).
This is Guy Steele's sequence GS(5, 2) (see A135416).
Related to A007913 via A225546.
A059897 is used to express relationship between sequence terms.
Cf. A091476 (Dgf at s=2).

Programs

  • Haskell
    import Data.Bits ((.&.))
    a006519 n = n .&. (-n) :: Integer
    -- Reinhard Zumkeller, Mar 11 2012, Dec 29 2011
    
  • Julia
    using IntegerSequences
    [EvenPart(n) for n in 1:102] |> println  # Peter Luschny, Sep 25 2021
    
  • Magma
    [2^Valuation(n, 2): n in [1..100]]; // Vincenzo Librandi, Mar 27 2015
    
  • Maple
    with(numtheory): for n from 1 to 200 do if n mod 2 = 1 then printf(`%d,`,1) else printf(`%d,`,2^ifactors(n)[2][1][2]) fi; od:
    A006519 := proc(n) if type(n,'odd') then 1 ; else for f in ifactors(n)[2] do if op(1,f) = 2 then return 2^op(2,f) ; end if; end do: end if; end proc: # R. J. Mathar, Oct 25 2010
    A006519 := n -> 2^padic[ordp](n,2): # Peter Luschny, Nov 26 2010
  • Mathematica
    lowestOneBit[n_] := Block[{k = 0}, While[Mod[n, 2^k] == 0, k++]; 2^(k - 1)]; Table[lowestOneBit[n], {n, 102}] (* Robert G. Wilson v Nov 17 2004 *)
    Table[2^IntegerExponent[n, 2], {n, 128}] (* Jean-François Alcover, Feb 10 2012 *)
    Table[BitAnd[BitNot[i - 1], i], {i, 1, 102}] (* Peter Luschny, Oct 10 2019 *)
  • PARI
    {a(n) = 2^valuation(n, 2)};
    
  • PARI
    a(n)=1<Joerg Arndt, Jun 10 2011
    
  • PARI
    a(n)=bitand(n,-n); \\ Joerg Arndt, Jun 10 2011
    
  • PARI
    a(n)=direuler(p=2,n,if(p==2,1/(1-2*X),1/(1-X)))[n] \\ Ralf Stephan, Mar 27 2015
    
  • Python
    def A006519(n): return n&-n # Chai Wah Wu, Jul 06 2022
  • Scala
    (1 to 128).map(Integer.lowestOneBit()) // _Alonso del Arte, Mar 04 2020
    

Formula

a(n) = n AND -n (where "AND" is bitwise, and negative numbers are represented in two's complement in a suitable bit width). - Marc LeBrun, Sep 25 2000, clarified by Alonso del Arte, Mar 16 2020
Also: a(n) = gcd(2^n, n). - Labos Elemer, Apr 22 2003
Multiplicative with a(p^e) = p^e if p = 2; 1 if p > 2. - David W. Wilson, Aug 01 2001
G.f.: Sum_{k>=0} 2^k*x^2^k/(1 - x^2^(k+1)). - Ralf Stephan, May 06 2003
Dirichlet g.f.: zeta(s)*(2^s - 1)/(2^s - 2) = zeta(s)*(1 - 2^(-s))/(1 - 2*2^(-s)). - Ralf Stephan, Jun 17 2007
a(n) = 2^floor(A002487(n - 1) / A002487(n)). - Reikku Kulon, Oct 05 2008
a(n) = 2^A007814(n). - R. J. Mathar, Oct 25 2010
a((2*k - 1)*2^e) = 2^e, k >= 1, e >= 0. - Johannes W. Meijer, Jun 07 2011
a(n) = denominator of Euler(n-1, 1). - Arkadiusz Wesolowski, Jul 12 2012
a(n) = A011782(A001511(n)). - Omar E. Pol, Sep 13 2013
a(n) = (n XOR floor(n/2)) XOR (n-1 XOR floor((n-1)/2)) = n - (n AND n-1) (where "AND" is bitwise). - Gary Detlefs, Jun 12 2014
a(n) = ((n XOR n-1)+1)/2. - Gary Detlefs, Jul 02 2014
a(n) = A171977(n)/2. - Peter Kern, Jan 04 2017
a(n) = 2^(A001511(n)-1). - Doug Bell, Jun 02 2017
a(n) = abs(A003188(n-1) - A003188(n)). - Doug Bell, Jun 02 2017
Conjecture: a(n) = (1/(A000203(2*n)/A000203(n)-2)+1)/2. - Velin Yanev, Jun 30 2017
a(n) = (n-1) o n where 'o' is the bitwise converse nonimplication. 'o' is not commutative. n o (n+1) = A135481(n). - Peter Luschny, Oct 10 2019
From Peter Munn, Dec 13 2019: (Start)
a(A225546(n)) = A225546(A007913(n)).
a(A059897(n,k)) = A059897(a(n), a(k)). (End)
Sum_{k=1..n} a(k) ~ (1/(2*log(2)))*n*log(n) + (3/4 + (gamma-1)/(2*log(2)))*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 15 2022
a(n) = n / A000265(n). - Amiram Eldar, May 22 2025

Extensions

More terms from James Sellers, Jun 20 2000

A220466 a((2*n-1)*2^p) = 4^p*(n-1) + 2^(p-1)*(1+2^p), p >= 0 and n >= 1.

Original entry on oeis.org

1, 3, 2, 10, 3, 7, 4, 36, 5, 11, 6, 26, 7, 15, 8, 136, 9, 19, 10, 42, 11, 23, 12, 100, 13, 27, 14, 58, 15, 31, 16, 528, 17, 35, 18, 74, 19, 39, 20, 164, 21, 43, 22, 90, 23, 47, 24, 392, 25, 51, 26, 106, 27, 55, 28, 228, 29, 59, 30, 122, 31, 63, 32, 2080, 33, 67, 34, 138, 35
Offset: 1

Views

Author

Johannes W. Meijer, Dec 24 2012

Keywords

Comments

The a(n) appeared in the analysis of A220002, a sequence related to the Catalan numbers.
The first Maple program makes use of a program by Peter Luschny for the calculation of the a(n) values. The second Maple program shows that this sequence has a beautiful internal structure, see the first formula, while the third Maple program makes optimal use of this internal structure for the fast calculation of a(n) values for large n.
The cross references lead to sequences that have the same internal structure as this sequence.

Crossrefs

Cf. A000027 (the natural numbers), A000120 (1's-counting sequence), A000265 (remove 2's from n), A001316 (Gould's sequence), A001511 (the ruler function), A003484 (Hurwitz-Radon numbers), A003602 (a fractal sequence), A006519 (highest power of 2 dividing n), A007814 (binary carry sequence), A010060 (Thue-Morse sequence), A014577 (dragon curve), A014707 (dragon curve), A025480 (nim-values), A026741, A035263 (first Feigenbaum symbolic sequence), A037227, A038712, A048460, A048896, A051176, A053381 (smooth nowhere-zero vector fields), A055975 (Gray code related), A059134, A060789, A060819, A065916, A082392, A085296, A086799, A088837, A089265, A090739, A091512, A091519, A096268, A100892, A103391, A105321 (a fractal sequence), A109168 (a continued fraction), A117973, A129760, A151930, A153733, A160467, A162728, A181988, A182241, A191488 (a companion to Gould's sequence), A193365, A220466 (this sequence).

Programs

  • Haskell
    -- Following Ralf Stephan's recurrence:
    import Data.List (transpose)
    a220466 n = a006519_list !! (n-1)
    a220466_list = 1 : concat
       (transpose [zipWith (-) (map (* 4) a220466_list) a006519_list, [2..]])
    -- Reinhard Zumkeller, Aug 31 2014
  • Maple
    # First Maple program
    a := n -> 2^padic[ordp](n, 2)*(n+1)/2 : seq(a(n), n=1..69); # Peter Luschny, Dec 24 2012
    # Second Maple program
    nmax:=69: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 1 to ceil(nmax/(p+2)) do a((2*n-1)*2^p) := 4^p*(n-1)  + 2^(p-1)*(1+2^p) od: od: seq(a(n), n=1..nmax);
    # Third Maple program
    nmax:=69: for p from 0 to ceil(simplify(log[2](nmax))) do n:=2^p: n1:=1: while n <= nmax do a(n) := 4^p*(n1-1)+2^(p-1)*(1+2^p): n:=n+2^(p+1): n1:= n1+1: od: od:  seq(a(n), n=1..nmax);
  • Mathematica
    A220466 = Module[{n, p}, p = IntegerExponent[#, 2]; n = (#/2^p + 1)/2; 4^p*(n - 1) + 2^(p - 1)*(1 + 2^p)] &; Array[A220466, 50] (* JungHwan Min, Aug 22 2016 *)
  • PARI
    a(n)=if(n%2,n\2+1,4*a(n/2)-2^valuation(n/2,2)) \\ Ralf Stephan, Dec 17 2013
    

Formula

a((2*n-1)*2^p) = 4^p*(n-1) + 2^(p-1)*(1+2^p), p >= 0 and n >= 1. Observe that a(2^p) = A007582(p).
a(n) = ((n+1)/2)*(A060818(n)/A060818(n-1))
a(n) = (-1/64)*(q(n+1)/q(n))/(2*n+1) with q(n) = (-1)^(n+1)*2^(4*n-5)*(2*n)!*A060818(n-1) or q(n) = (1/8)*A220002(n-1)*1/(A098597(2*n-1)/A046161(2*n))*1/(A008991(n-1)/A008992(n-1))
Recurrence: a(2n) = 4a(n) - 2^A007814(n), a(2n+1) = n+1. - Ralf Stephan, Dec 17 2013

A051062 a(n) = 16*n + 8.

Original entry on oeis.org

8, 24, 40, 56, 72, 88, 104, 120, 136, 152, 168, 184, 200, 216, 232, 248, 264, 280, 296, 312, 328, 344, 360, 376, 392, 408, 424, 440, 456, 472, 488, 504, 520, 536, 552, 568, 584, 600, 616, 632, 648, 664, 680, 696, 712, 728, 744, 760, 776, 792, 808, 824, 840
Offset: 0

Views

Author

Keywords

Comments

Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0(97).
n such that 32 is the largest power of 2 dividing A003629(k)^n-1 for any k. - Benoit Cloitre, Mar 23 2002
Continued fraction expansion of tanh(1/8). - Benoit Cloitre, Dec 17 2002
If Y and Z are 2-blocks of a (4n+1)-set X then a(n-1) is the number of 3-subsets of X intersecting both Y and Z. - Milan Janjic, Oct 28 2007
General form: (q*n+x)*q x=+1; q=2=A016825, q=3=A017197, q=4=A119413, ... x=-1; q=3=A017233, q=4=A098502, ... x=+2; q=4=A051062, ... - Vladimir Joseph Stephan Orlovsky, Feb 16 2009
a(n)*n+1 = (4n+1)^2 and a(n)*(n+1)+1 = (4n+3)^2 are both perfect squares. - Carmine Suriano, Jun 01 2014
For all positive integers n, there are infinitely many positive integers k such that k*n + 1 and k*(n+1) + 1 are both perfect squares. Except for 8, all the numbers of this sequence are the smallest integers k which are solutions for getting two perfect squares. Example: a(1) = 24 and 24 * 1 + 1 = 25 = 5^2, then 24 * (1+1) + 1 = 49 = 7^2. [Reference AMM] - Bernard Schott, Sep 24 2017
Numbers k such that 3^k + 1 is divisible by 17*193. - Bruno Berselli, Aug 22 2018

References

  • Letter from Gary W. Adamson concerning Prouhet-Thue-Morse sequence, Nov 11 1999.

Crossrefs

Programs

Formula

a(n) = A118413(n+1,4) for n>3. - Reinhard Zumkeller, Apr 27 2006
a(n) = 32*n - a(n-1) for n>0, a(0)=8. - Vincenzo Librandi, Aug 06 2010
A003484(a(n)) = 8; A209675(a(n)) = 9. - Reinhard Zumkeller, Mar 11 2012
A007814(a(n)) = 3; A037227(a(n)) = 7. - Reinhard Zumkeller, Jun 30 2012
a(-1 - n) = - a(n). - Michael Somos, Jun 02 2014
Sum_{n>=0} (-1)^n/a(n) = Pi/32 (A244978). - Amiram Eldar, Feb 28 2023
From Elmo R. Oliveira, Apr 16 2024: (Start)
G.f.: 8*(1+x)/(1-x)^2.
E.g.f.: 8*exp(x)*(1 + 2*x).
a(n) = 8*A005408(n) = A008598(n) + 8 = A139098(n+1) - A139098(n).
a(n) = 4*A016825(n) = 2*A017113(n) = 2*a(n-1) - a(n-2) for n >= 2. (End)
From Amiram Eldar, Nov 25 2024: (Start)
Product_{n>=0} (1 - (-1)^n/a(n)) = sqrt(2)*sin(7*Pi/32).
Product_{n>=0} (1 + (-1)^n/a(n)) = sqrt(2)*cos(7*Pi/32). (End)

A003485 Hurwitz-Radon function at powers of 2.

Original entry on oeis.org

1, 2, 4, 8, 9, 10, 12, 16, 17, 18, 20, 24, 25, 26, 28, 32, 33, 34, 36, 40, 41, 42, 44, 48, 49, 50, 52, 56, 57, 58, 60, 64, 65, 66, 68, 72, 73, 74, 76, 80, 81, 82, 84, 88, 89, 90, 92, 96, 97, 98, 100, 104, 105, 106, 108, 112, 113, 114, 116, 120, 121, 122, 124
Offset: 0

Views

Author

Keywords

Comments

Positive integers that are congruent to {0, 1, 2, 4} mod 8. - Michael Somos, Dec 12 2023

Examples

			G.f. = 1 + 2*x + 4*x^2 + 8*x^3 + 9*x^4 + 10*x^5 + 12*x^6+ 16*x^7 + ... - _Michael Somos_, Dec 12 2023
		

References

  • T. Y. Lam, The Algebraic Theory of Quadratic Forms. Benjamin, Reading, MA, 1973, p. 131.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Essentially the same as A047466.
Cf. A008621. - Johannes W. Meijer, Jun 07 2011
Cf. A209675.

Programs

  • Haskell
    a003485 n = a003485_list !! n
    a003485_list = 1 : 2 : 4 : 8 : 9 : zipWith (+)
       (drop 4 a003485_list) (zipWith (-) (tail a003485_list) a003485_list)
    -- Reinhard Zumkeller, Mar 11 2012
    
  • Maple
    A003485:= proc(n): ceil((n+1)/4) + ceil((n)/4) + 2*ceil((n-1)/4) + 4*ceil((n-2)/4) end: seq(A003485(n), n=0..62); # Johannes W. Meijer, Jun 07 2011
  • Mathematica
    CoefficientList[Series[(1+x+2x^2+4x^3)/((1-x)(1-x^4)),{x,0,70}],x] (* or *) LinearRecurrence[{1,0,0,1,-1},{1,2,4,8,9},71] (* Harvey P. Dale, Jun 13 2011 *)
    a[ n_] := 2*n + Max[0, 2-Mod[n-3, 4]]; (* Michael Somos, Dec 12 2023 *)
  • PARI
    {a(n) = 2*n + max(0, 2 - (n-3)%4)}; /* Michael Somos, Dec 12 2023 */

Formula

G.f.: (1 + x + 2*x^2 + 4*x^3) / ((1-x)*(1-x^4)). - Simon Plouffe in his 1992 dissertation
a(n) = ceiling((n+1)/4) + ceiling((n)/4) + 2*ceiling((n-1)/4) + 4*ceiling((n-2)/4). - Johannes W. Meijer, Jun 07 2011
a(n) = a(n-1) + a(n-4) - a(n-5); a(0)=1, a(1)=2, a(2)=4, a(3)=8, a(4)=9. - Harvey P. Dale, Jun 13 2011
a(n) = -A047507(-n) = a(n+4) - 8 for all n in Z. - Michael Somos, Dec 12 2023

A053381 Maximal number of linearly independent smooth nowhere-zero vector fields on a (2n+1)-sphere.

Original entry on oeis.org

1, 3, 1, 7, 1, 3, 1, 8, 1, 3, 1, 7, 1, 3, 1, 9, 1, 3, 1, 7, 1, 3, 1, 8, 1, 3, 1, 7, 1, 3, 1, 11, 1, 3, 1, 7, 1, 3, 1, 8, 1, 3, 1, 7, 1, 3, 1, 9, 1, 3, 1, 7, 1, 3, 1, 8, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 8, 1, 3, 1, 7, 1, 3, 1, 9, 1, 3, 1, 7, 1, 3, 1, 8, 1, 3, 1, 7, 1, 3, 1, 11, 1, 3, 1, 7, 1, 3
Offset: 0

Views

Author

Warren D. Smith, Jan 06 2000

Keywords

Comments

The corresponding terms for a 2n-sphere are all 0 ("you can't comb the hair on a billiard ball"). The "3" and "7" come from the quaternions and octonions.
b(n) = a(n-1): b(2^e) = ((e+1) idiv 4) + 2^((e+1) mod 4) - 1, b(p^e) = 1, p>2. - Christian G. Bower, May 18 2005
a(n-1) is multiplicative. - Christian G. Bower, Jun 03 2005

Crossrefs

For another version see A003484. Cf. A189995, A001676.

Programs

  • C
    int MaxLinInd(int n){ /* Returns max # linearly indep smooth nowhere zero * vector fields on S^{n-1}, n=1,2,... */ int b,c,d,rho; b = 0; while((n & 1)==0){ n /= 2; b++; } c = b & 3; d = (b - c)/4; rho = (1 << c) + 8*d; return( rho - 1); }
    
  • C
    int MaxLinInd(int n) { int b = _builtin_ctz(n); return (1<<b%4) + b/4*8 - 1; } /* _Jeremy Tan, Apr 09 2021 */
  • Maple
    with(numtheory): for n from 1 to 601 by 2 do c := irem(ifactors(n+1)[2,1,2],4): d := iquo(ifactors(n+1)[2,1,2],4): printf(`%d,`, 2^c+8*d-1) od:
    nmax:=101: A047530 := proc(n): ceil(n/4) + 2*ceil((n-1)/4) + 4*ceil((n-2)/4) + ceil((n-3)/4) end: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 0 to ceil(nmax/(p+2))+1 do A053381((2*n+1)*2^p-1) := A047530(p+1): od: od: seq(A053381(n), n=0..nmax); # Johannes W. Meijer, Jun 07 2011, revised Jan 29 2013
  • Mathematica
    a[n_] := Module[{b, c, d, rho, n0}, n0 = 2*n; b = 0; While[BitAnd[n0, 1] == 0, n0 /= 2; b++]; c = BitAnd[b, 3]; d = (b - c)/4; rho = 2^c + 8*d; Return[rho - 1]]; Table[a[n], {n, 1, 102}] (* Jean-François Alcover, May 16 2013, translated from C *)

Formula

Let f(n) be the number of linearly independent smooth nowhere-zero vector fields on an n-sphere. Then f(n) = 2^c + 8d - 1 where n+1 = (2a+1) 2^b and b = c+4d and 0 <= c <= 3. f(n) = 0 if n is even.
a((2*n+1)*2^p-1) = A047530(p+1), p >= 0 and n >= 0. a(2*n) = 1, n >= 0, and a(2^p-1) = A047530(p+1), p >= 0. - Johannes W. Meijer, Jun 07 2011
a(n) = A209675(n+1) - 1. - Reinhard Zumkeller, Mar 11 2012
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 10/3. - Amiram Eldar, Nov 29 2022

Extensions

More terms from James Sellers, Jun 01 2000

A101122 XOR BINOMIAL transform of A101119.

Original entry on oeis.org

7, 17, 0, 34, 0, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 514, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Simon Plouffe and Paul D. Hanna, Dec 02 2004

Keywords

Comments

Nonzero terms form A101121 and occur at positions 2^k for k >= 0. A101119 equals the nonzero differences of A006519 and A003484. See A099884 for the definition of the XOR BINOMIAL transform.

Crossrefs

Programs

  • PARI
    {a(n)=local(B);B=0;for(i=0,n-1,B=bitxor(B,binomial(n-1,i)%2* (16*2^valuation(n-i,2)-2^(valuation(n-i,2)%4)-8*(valuation(n-i,2)\4)-8)));B}
    
  • Python
    from operator import xor
    from functools import reduce
    def A101122(n): return reduce(xor,(((1<<(m:=(~(k+1)&k).bit_length()+4))-((m&-4)<<1)-(1<<(m&3)))&-int(not k&~(n-1)) for k in range(n))) # Chai Wah Wu, Jul 10 2022

Formula

a(n) = SumXOR_{k=0..n} (C(n, k) mod 2)*A101119(k), where SumXOR is summation under XOR. A101119(n) = SumXOR_{k=0..n} (C(n, k) mod 2)*a(k). a(2^(n-1)) = A101121(n) for n >= 1 and a(k)=0 when k is not a power of 2.

A034584 Radon-Hurwitz numbers: log_2 of dimension of an irreducible R-module for Clifford algebra Cl_n.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 3, 3, 4, 5, 6, 6, 7, 7, 7, 7, 8, 9, 10, 10, 11, 11, 11, 11, 12, 13, 14, 14, 15, 15, 15, 15, 16, 17, 18, 18, 19, 19, 19, 19, 20, 21, 22, 22, 23, 23, 23, 23, 24, 25, 26, 26, 27, 27, 27, 27, 28, 29, 30, 30, 31, 31, 31, 31
Offset: 0

Views

Author

Keywords

References

  • H. Blaine Lawson, Jr. and M.-L. Michelsohn, Spin Geometry, Princeton, p. 33.
  • Pertti Lounesto, Clifford Algebras and Spinors, Cambridge, 1997, p. 226.

Crossrefs

Programs

  • PARI
    concat(0, Vec(x*(1+ x + x^3 + x^7)/((1 - x)*(1 - x^8)) + O(x^80))) \\ Michel Marcus, Oct 03 2014

Formula

a(n+8) = a(n) + 4, n >= 0, a(0) = 0, a(1) = 1, a(2)= a(3) = 2, a(4) = a(5) = a(6) = a(7) =3.
G.f.: x*(1+ x + x^3 + x^7)/((1 - x)*(1 - x^8)). - Wolfdieter Lang, Oct 03 2014
Showing 1-10 of 12 results. Next