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 16 results. Next

A007814 Exponent of highest power of 2 dividing n, a.k.a. the binary carry sequence, the ruler sequence, or the 2-adic valuation of n.

Original entry on oeis.org

0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0
Offset: 1

Views

Author

John Tromp, Dec 11 1996

Keywords

Comments

This sequence is an exception to my usual rule that when every other term of a sequence is 0 then those 0's should be omitted. In this case we would get A001511. - N. J. A. Sloane
To construct the sequence: start with 0,1, concatenate to get 0,1,0,1. Add + 1 to last term gives 0,1,0,2. Concatenate those 4 terms to get 0,1,0,2,0,1,0,2. Add + 1 to last term etc. - Benoit Cloitre, Mar 06 2003
The sequence is invariant under the following two transformations: increment every element by one (1, 2, 1, 3, 1, 2, 1, 4, ...), put a zero in front and between adjacent elements (0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, ...). The intermediate result is A001511. - Ralf Hinze (ralf(AT)informatik.uni-bonn.de), Aug 26 2003
Fixed point of the morphism 0->01, 1->02, 2->03, 3->04, ..., n->0(n+1), ..., starting from a(1) = 0. - Philippe Deléham, Mar 15 2004
Fixed point of the morphism 0->010, 1->2, 2->3, ..., n->(n+1), .... - Joerg Arndt, Apr 29 2014
a(n) is also the number of times to repeat a step on an even number in the hailstone sequence referenced in the Collatz conjecture. - Alex T. Flood (whiteangelsgrace(AT)gmail.com), Sep 22 2006
Let F(n) be the n-th Fermat number (A000215). Then F(a(r-1)) divides F(n)+2^k for r = k mod 2^n and r != 1. - T. D. Noe, Jul 12 2007
The following relation holds: 2^A007814(n)*(2*A025480(n-1)+1) = A001477(n) = n. (See functions hd, tl and cons in [Paul Tarau 2009].)
a(n) is the number of 0's at the end of n when n is written in base 2.
a(n+1) is the number of 1's at the end of n when n is written in base 2. - M. F. Hasler, Aug 25 2012
Shows which bit to flip when creating the binary reflected Gray code (bits are numbered from the right, offset is 0). That is, A003188(n) XOR A003188(n+1) == 2^A007814(n). - Russ Cox, Dec 04 2010
The sequence is squarefree (in the sense of not containing any subsequence of the form XX) [Allouche and Shallit]. Of course it contains individual terms that are squares (such as 4). - Comment expanded by N. J. A. Sloane, Jan 28 2019
a(n) is the number of zero coefficients in the n-th Stern polynomial, A125184. - T. D. Noe, Mar 01 2011
Lemma: For n < m with r = a(n) = a(m) there exists n < k < m with a(k) > r. Proof: We have n=b2^r and m=c2^r with b < c both odd; choose an even i between them; now a(i2^r) > r and n < i2^r < m. QED. Corollary: Every finite run of consecutive integers has a unique maximum 2-adic valuation. - Jason Kimberley, Sep 09 2011
a(n-2) is the 2-adic valuation of A000166(n) for n >= 2. - Joerg Arndt, Sep 06 2014
a(n) = number of 1's in the partition having Heinz number n. We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product_{j=1..r} p_j-th prime (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1, 1, 2, 4, 10] we get 2*2*3*7*29 = 2436. Example: a(24)=3; indeed, the partition having Heinz number 24 = 2*2*2*3 is [1,1,1,2]. - Emeric Deutsch, Jun 04 2015
a(n+1) is the difference between the two largest parts in the integer partition having viabin number n (0 is assumed to be a part). Example: a(20) = 2. Indeed, we have 19 = 10011_2, leading to the Ferrers board of the partition [3,1,1]. For the definition of viabin number see the comment in A290253. - Emeric Deutsch, Aug 24 2017
Apart from being squarefree, as noted above, the sequence has the property that every consecutive subsequence contains at least one number an odd number of times. - Jon Richfield, Dec 20 2018
a(n+1) is the 2-adic valuation of Sum_{e=0..n} u^e = (1 + u + u^2 + ... + u^n), for any u of the form 4k+1 (A016813). - Antti Karttunen, Aug 15 2020
{a(n)} represents the "first black hat" strategy for the game of countably infinitely many hats, with a probability of success of 1/3; cf. the Numberphile link below. - Frederic Ruget, Jun 14 2021
a(n) is the least nonnegative integer k for which there does not exist i+j=n and a(i)=a(j)=k (cf. A322523). - Rémy Sigrist and Jianing Song, Aug 23 2022

Examples

			2^3 divides 24, so a(24)=3.
From _Omar E. Pol_, Jun 12 2009: (Start)
Triangle begins:
  0;
  1,0;
  2,0,1,0;
  3,0,1,0,2,0,1,0;
  4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0;
  5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0;
  6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,...
(End)
		

References

  • J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 27.
  • K. Atanassov, On the 37th and the 38th Smarandache Problems, Notes on Number Theory and Discrete Mathematics, Sophia, Bulgaria, Vol. 5 (1999), No. 2, 83-85.
  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.

Crossrefs

Cf. A011371 (partial sums), A094267 (first differences), A001511 (bisection), A346070 (mod 4).
Bisection of A050605 and |A088705|. Pairwise sums are A050603 and A136480. Difference of A285406 and A281264.
This is Guy Steele's sequence GS(1, 4) (see A135416). Cf. A053398(1,n). Column/row 1 of table A050602.
Cf. A007949 (3-adic), A235127 (4-adic), A112765 (5-adic), A122841 (6-adic), A214411 (7-adic), A244413 (8-adic), A122840 (10-adic).
Cf. A086463 (Dgf at s=2).

Programs

  • Haskell
    a007814 n = if m == 0 then 1 + a007814 n' else 0
                where (n', m) = divMod n 2
    -- Reinhard Zumkeller, Jul 05 2013, May 14 2011, Apr 08 2011
    
  • Haskell
    a007814 n | odd n = 0 | otherwise = 1 + a007814 (n `div` 2)
    --  Walt Rorie-Baety, Mar 22 2013
    
  • Magma
    [Valuation(n, 2): n in [1..120]]; // Bruno Berselli, Aug 05 2013
    
  • Maple
    ord := proc(n) local i,j; if n=0 then return 0; fi; i:=0; j:=n; while j mod 2 <> 1 do i:=i+1; j:=j/2; od: i; end proc: seq(ord(n), n=1..111);
    A007814 := n -> padic[ordp](n,2): seq(A007814(n), n=1..111); # Peter Luschny, Nov 26 2010
  • Mathematica
    Table[IntegerExponent[n, 2], {n, 64}] (* Eric W. Weisstein *)
    IntegerExponent[Range[64], 2] (* Eric W. Weisstein, Feb 01 2024 *)
    p=2; Array[ If[ Mod[ #, p ]==0, Select[ FactorInteger[ # ], Function[ q, q[ [ 1 ] ]==p ], 1 ][ [ 1, 2 ] ], 0 ]&, 96 ]
    DigitCount[BitXor[x, x - 1], 2, 1] - 1; a different version based on the same concept: Floor[Log[2, BitXor[x, x - 1]]] (* Jaume Simon Gispert (jaume(AT)nuem.com), Aug 29 2004 *)
    Nest[Join[ #, ReplacePart[ #, Length[ # ] -> Last[ # ] + 1]] &, {0, 1}, 5] (* N. J. Gunther, May 23 2009 *)
    Nest[ Flatten[# /. a_Integer -> {0, a + 1}] &, {0}, 7] (* Robert G. Wilson v, Jan 17 2011 *)
  • PARI
    A007814(n)=valuation(n,2);
    
  • Python
    import math
    def a(n): return int(math.log(n - (n & n - 1), 2)) # Indranil Ghosh, Apr 18 2017
    
  • Python
    def A007814(n): return (~n & n-1).bit_length() # Chai Wah Wu, Jul 01 2022
    
  • R
    sapply(1:100,function(x) sum(gmp::factorize(x)==2)) # Christian N. K. Anderson, Jun 20 2013
    
  • Scheme
    (define (A007814 n) (let loop ((n n) (e 0)) (if (odd? n) e (loop (/ n 2) (+ 1 e))))) ;; Antti Karttunen, Oct 06 2017

Formula

a(n) = A001511(n) - 1.
a(2*n) = A050603(2*n) = A001511(n).
a(n) = A091090(n-1) + A036987(n-1) - 1.
a(n) = 0 if n is odd, otherwise 1 + a(n/2). - Reinhard Zumkeller, Aug 11 2001
Sum_{k=1..n} a(k) = n - A000120(n). - Benoit Cloitre, Oct 19 2002
G.f.: A(x) = Sum_{k>=1} x^(2^k)/(1-x^(2^k)). - Ralf Stephan, Apr 10 2002
G.f. A(x) satisfies A(x) = A(x^2) + x^2/(1-x^2). A(x) = B(x^2) = B(x) - x/(1-x), where B(x) is the g.f. for A001151. - Franklin T. Adams-Watters, Feb 09 2006
Totally additive with a(p) = 1 if p = 2, 0 otherwise.
Dirichlet g.f.: zeta(s)/(2^s-1). - Ralf Stephan, Jun 17 2007
Define 0 <= k <= 2^n - 1; binary: k = b(0) + 2*b(1) + 4*b(2) + ... + 2^(n-1)*b(n-1); where b(x) are 0 or 1 for 0 <= x <= n - 1; define c(x) = 1 - b(x) for 0 <= x <= n - 1; Then: a(k) = c(0) + c(0)*c(1) + c(0)*c(1)*c(2) + ... + c(0)*c(1)...c(n-1); a(k+1) = b(0) + b(0)*b(1) + b(0)*b(1)*b(2) + ... + b(0)*b(1)...b(n-1). - Arie Werksma (werksma(AT)tiscali.nl), May 10 2008
a(n) = floor(A002487(n - 1) / A002487(n)). - Reikku Kulon, Oct 05 2008
Sum_{k=1..n} (-1)^A000120(n-k)*a(k) = (-1)^(A000120(n)-1)*(A000120(n) - A000035(n)). - Vladimir Shevelev, Mar 17 2009
a(A001147(n) + A057077(n-1)) = a(2*n). - Vladimir Shevelev, Mar 21 2009
For n>=1, a(A004760(n+1)) = a(n). - Vladimir Shevelev, Apr 15 2009
2^(a(n)) = A006519(n). - Philippe Deléham, Apr 22 2009
a(n) = A063787(n) - A000120(n). - Gary W. Adamson, Jun 04 2009
a(C(n,k)) = A000120(k) + A000120(n-k) - A000120(n). - Vladimir Shevelev, Jul 19 2009
a(n!) = n - A000120(n). - Vladimir Shevelev, Jul 20 2009
v_{2}(n) = Sum_{r>=1} (r / 2^(r+1)) Sum_{k=0..2^(r+1)-1} e^(2(k*Pi*i(n+2^r))/(2^(r+1))). - A. Neves, Sep 28 2010, corrected Oct 04 2010
a(n) mod 2 = A096268(n-1). - Robert G. Wilson v, Jan 18 2012
a(A005408(n)) = 1; a(A016825(n)) = 3; A017113(a(n)) = 5; A051062(a(n)) = 7; a(n) = (A037227(n)-1)/2. - Reinhard Zumkeller, Jun 30 2012
a((2*n-1)*2^p) = p, p >= 0 and n >= 1. - Johannes W. Meijer, Feb 04 2013
a(n) = A067255(n,1). - Reinhard Zumkeller, Jun 11 2013
a(n) = log_2(n - (n AND n-1)). - Gary Detlefs, Jun 13 2014
a(n) = 1 + A000120(n-1) - A000120(n), where A000120 is the Hamming weight function. - Stanislav Sykora, Jul 14 2014
A053398(n,k) = a(A003986(n-1,k-1)+1); a(n) = A053398(n,1) = A053398(n,n) = A053398(2*n-1,n) = Min_{k=1..n} A053398(n,k). - Reinhard Zumkeller, Aug 04 2014
a((2*x-1)*2^n) = a((2*y-1)*2^n) for positive n, x and y. - Juri-Stepan Gerasimov, Aug 04 2016
a(n) = A285406(n) - A281264(n). - Ralf Steiner, Apr 18 2017
a(n) = A000005(n)/(A000005(2*n) - A000005(n)) - 1. - conjectured by Velin Yanev, Jun 30 2017, proved by Nicholas Stearns, Sep 11 2017
Equivalently to above formula, a(n) = A183063(n) / A001227(n), i.e., a(n) is the number of even divisors of n divided by number of odd divisors of n. - Franklin T. Adams-Watters, Oct 31 2018
a(n)*(n mod 4) = 2*floor(((n+1) mod 4)/3). - Gary Detlefs, Feb 16 2019
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1. - Amiram Eldar, Jul 11 2020
a(n) = 2*Sum_{j=1..floor(log_2(n))} frac(binomial(n, 2^j)*2^(j-1)/n). - Dario T. de Castro, Jul 08 2022
a(n) = A070939(n) - A070939(A030101(n)). - Andrew T. Porter, Dec 16 2022
a(n) = floor((gcd(n, 2^n)^(n+1) mod (2^(n+1)-1)^2)/(2^(n+1)-1)) (see Lemma 3.4 from Mazzanti's 2002 article). - Lorenzo Sauras Altuzarra, Mar 10 2024
a(n) = 1 - A088705(n). - Chai Wah Wu, Sep 18 2024

Extensions

Formula index adapted to the offset of A025480 by R. J. Mathar, Jul 20 2010
Edited by Ralf Stephan, Feb 08 2014

A017113 a(n) = 8*n + 4.

Original entry on oeis.org

4, 12, 20, 28, 36, 44, 52, 60, 68, 76, 84, 92, 100, 108, 116, 124, 132, 140, 148, 156, 164, 172, 180, 188, 196, 204, 212, 220, 228, 236, 244, 252, 260, 268, 276, 284, 292, 300, 308, 316, 324, 332, 340, 348, 356, 364, 372, 380, 388, 396, 404, 412, 420, 428, 436, 444, 452, 460, 468
Offset: 0

Views

Author

Keywords

Comments

Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0(65).
n such that 16 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/4). - Benoit Cloitre, Dec 17 2002
Consider all primitive Pythagorean triples (a,b,c) with c - a = 8, sequence gives values for b. (Corresponding values for a are A078371(n), while c follows A078370(n).) - Lambert Klasen (Lambert.Klasen(AT)gmx.net), Nov 19 2004
Also numbers of the form a^2 + b^2 + c^2 + d^2, where a,b,c,d are odd integers. - Alexander Adamchuk, Dec 01 2006
If X is an n-set and Y_i (i=1,2,3) mutually disjoint 2-subsets of X then a(n-5) is equal to the number of 4-subsets of X intersecting each Y_i (i=1,2,3). - Milan Janjic, Aug 26 2007
A007814(a(n)) = 2; A037227(a(n)) = 5. - Reinhard Zumkeller, Jun 30 2012
Numbers k such that 3^k + 1 is divisible by 41. - Bruno Berselli, Aug 22 2018
Lexicographically smallest arithmetic progression of positive integers avoiding Fibonacci numbers. - Paolo Xausa, May 08 2023
From Martin Renner, May 24 2024: (Start)
Also number of points in a grid cross with equally long arms and a width of two points, e.g.:
* *
* * * *
* * * * * *
* * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * *
* * * * * *
* * * *
* *
etc. (End)

Crossrefs

First differences of A016742 (even squares).
Cf. A078370, A078371, A081770 (subsequence).

Programs

Formula

a(n) = A118413(n+1,3) for n > 2. - Reinhard Zumkeller, Apr 27 2006
a(n) = Sum_{k=0..4*n} (i^k+1)*(i^(4*n-k)+1), where i = sqrt(-1). - Bruno Berselli, Mar 19 2012
a(n) = 4*A005408(n). - Omar E. Pol, Apr 17 2016
E.g.f.: (8*x + 4)*exp(x). - G. C. Greubel, Apr 26 2018
G.f.: 4*(1+x)/(1-x)^2. - Wolfdieter Lang, Oct 27 2020
Sum_{n>=0} (-1)^n/a(n) = Pi/16 (A019683). - Amiram Eldar, Dec 11 2021
From Amiram Eldar, Nov 22 2024: (Start)
Product_{n>=0} (1 - (-1)^n/a(n)) = sqrt(2) * sin(3*Pi/16).
Product_{n>=0} (1 + (-1)^n/a(n)) = sqrt(2) * cos(3*Pi/16). (End)
a(n) = 2*A016825(n) = A008586(2*n+1). - Elmo R. Oliveira, Apr 10 2025

A118413 Triangle read by rows: T(n,k) = (2*n-1)*2^(k-1), 0

Original entry on oeis.org

1, 3, 6, 5, 10, 20, 7, 14, 28, 56, 9, 18, 36, 72, 144, 11, 22, 44, 88, 176, 352, 13, 26, 52, 104, 208, 416, 832, 15, 30, 60, 120, 240, 480, 960, 1920, 17, 34, 68, 136, 272, 544, 1088, 2176, 4352, 19, 38, 76, 152, 304, 608, 1216, 2432, 4864, 9728, 21, 42, 84, 168
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 27 2006

Keywords

Comments

Central terms give A118415; row sums give A118414;
T(n,1) = A005408(n-1);
T(n,2) = A016825(n-1) for n>1;
T(n,3) = A017113(n-1) for n>2;
T(n,4) = A051062(n-1) for n>3;
T(n,n-2) = A052951(n-1) for n>2;
T(n,n) = A014480(n-1) = A118416(n,n);
A001511(T(n,k)) = A002260(n,k);
A003602(T(n,k)) = A002024(n,k).
G.f.: x*y*(1 + x + 2*x*y - 6*x^2*y)/((1 - x)^2*(1 - 2*x*y)^2). - Stefano Spezia, Dec 22 2024

Examples

			   1
   3   6
   5  10  20
   7  14  28  56
   9  18  36  72 144
  11  22  44  88 176 352
  13  26  52 104 208 416  832
  15  30  60 120 240 480  960 1920
  17  34  68 136 272 544 1088 2176 4352
  19  38  76 152 304 608 1216 2432 4864 9728
  ...
		

Crossrefs

Programs

  • Mathematica
    Select[Flatten[Table[(2n-1)2^(k-1),{n,20},{k,0,n}]],IntegerQ] (* Harvey P. Dale, Jan 17 2024 *)
  • Python
    from math import isqrt, comb
    def A118413(n):
        a = (m:=isqrt(k:=n<<1))+(k>m*(m+1))
        return ((a<<1)-1)<Chai Wah Wu, Jun 20 2025

A141419 Triangle read by rows: T(n, k) = A000217(n) - A000217(n - k) with 1 <= k <= n.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 4, 7, 9, 10, 5, 9, 12, 14, 15, 6, 11, 15, 18, 20, 21, 7, 13, 18, 22, 25, 27, 28, 8, 15, 21, 26, 30, 33, 35, 36, 9, 17, 24, 30, 35, 39, 42, 44, 45, 10, 19, 27, 34, 40, 45, 49, 52, 54, 55
Offset: 1

Views

Author

Roger L. Bagula, Aug 05 2008

Keywords

Comments

As a rectangle, the accumulation array of A051340.
From Clark Kimberling, Feb 05 2011: (Start)
Here all the weights are divided by two where they aren't in Cahn.
As a rectangle, A141419 is in the accumulation chain
... < A051340 < A141419 < A185874 < A185875 < A185876 < ...
(See A144112 for the definition of accumulation array.)
row 1: A000027
col 1: A000217
diag (1,5,...): A000326 (pentagonal numbers)
diag (2,7,...): A005449 (second pentagonal numbers)
diag (3,9,...): A045943 (triangular matchstick numbers)
diag (4,11,...): A115067
diag (5,13,...): A140090
diag (6,15,...): A140091
diag (7,17,...): A059845
diag (8,19,...): A140672
(End)
Let N=2*n+1 and k=1,2,...,n. Let A_{N,n-1} = [0,...,0,1; 0,...,0,1,1; ...; 0,1,...,1; 1,...,1], an n X n unit-primitive matrix (see [Jeffery]). Let M_n=[A_{N,n-1}]^4. Then t(n,k)=[M_n](1,k), that is, the n-th row of the triangle is given by the first row of M_n. - _L. Edson Jeffery, Nov 20 2011
Conjecture. Let N=2*n+1 and k=1,...,n. Let A_{N,0}, A_{N,1}, ..., A_{N,n-1} be the n X n unit-primitive matrices (again see [Jeffery]) associated with N, and define the Chebyshev polynomials of the second kind by the recurrence U_0(x) = 1, U_1(x) = 2*x and U_r(x) = 2*x*U_(r-1)(x) - U_(r-2)(x) (r>1). Define the column vectors V_(k-1) = (U_(k-1)(cos(Pi/N)), U_(k-1)(cos(3*Pi/N)), ..., U_(k-1)(cos((2*n-1)*Pi/N)))^T, where T denotes matrix transpose. Let S_N = [V_0, V_1, ..., V_(n-1)] be the n X n matrix formed by taking V_(k-1) as column k-1. Let X_N = [S_N]^T*S_N, and let [X_N](i,j) denote the entry in row i and column j of X_N, i,j in {0,...,n-1}. Then t(n,k) = [X_N](k-1,k-1), and row n of the triangle is given by the main diagonal entries of X_N. Remarks: Hence t(n,k) is the sum of squares t(n,k) = sum[m=1,...,n (U_(k-1)(cos((2*m-1)*Pi/N)))^2]. Finally, this sequence is related to A057059, since X_N = [sum_{m=1,...,n} A057059(n,m)*A_{N,m-1}] is also an integral linear combination of unit-primitive matrices from the N-th set. - L. Edson Jeffery, Jan 20 2012
Row sums: n*(n+1)*(2*n+1)/6. - L. Edson Jeffery, Jan 25 2013
n-th row = partial sums of n-th row of A004736. - Reinhard Zumkeller, Aug 04 2014
T(n,k) is the number of distinct sums made by at most k elements in {1, 2, ... n}, for 1 <= k <= n, e.g., T(6,2) = the number of distinct sums made by at most 2 elements in {1,2,3,4,5,6}. The sums range from 1, to 5+6=11. So there are 11 distinct sums. - Derek Orr, Nov 26 2014
A number n occurs in this sequence A001227(n) times, the number of odd divisors of n, see A209260. - Hartmut F. W. Hoft, Apr 14 2016
Conjecture: 2*n + 1 is composite if and only if gcd(t(n,m),m) != 1, for some m. - L. Edson Jeffery, Jan 30 2018
From Peter Munn, Aug 21 2019 in respect of the sequence read as a triangle: (Start)
A number m can be found in column k if and only if A286013(m, k) is nonzero, in which case m occurs in column k on row A286013(m, k).
The first occurrence of m is in row A212652(m) column A109814(m), which is the rightmost column in which m occurs. This occurrence determines where m appears in A209260. The last occurrence of m is in row m column 1.
Viewed as a sequence of rows, consider the subsequences (of rows) that contain every positive integer. The lexicographically latest of these subsequences consists of the rows with row numbers in A270877; this is the only one that contains its own row numbers only once.
(End)

Examples

			As a triangle:
   1,
   2,  3,
   3,  5,  6,
   4,  7,  9, 10,
   5,  9, 12, 14, 15,
   6, 11, 15, 18, 20, 21,
   7, 13, 18, 22, 25, 27, 28,
   8, 15, 21, 26, 30, 33, 35, 36,
   9, 17, 24, 30, 35, 39, 42, 44, 45,
  10, 19, 27, 34, 40, 45, 49, 52, 54, 55;
As a rectangle:
   1   2   3   4   5   6   7   8   9  10
   3   5   7   9  11  13  15  17  19  21
   6   9  12  15  18  21  24  27  30  33
  10  14  18  22  26  30  34  38  42  46
  15  20  25  30  35  40  45  50  55  60
  21  27  33  39  45  51  57  63  69  75
  28  35  42  49  56  63  70  77  84  91
  36  44  52  60  68  76  84  92 100 108
  45  54  63  72  81  90  99 108 117 126
  55  65  75  85  95 105 115 125 135 145
Since the odd divisors of 15 are 1, 3, 5 and 15, number 15 appears four times in the triangle at t(3+(5-1)/2, 5) in column 5 since 5+1 <= 2*3, t(5+(3-1)/2, 3), t(1+(15-1)/2, 2*1) in column 2 since 15+1 > 2*1, and t(15+(1-1)/2, 1). - _Hartmut F. W. Hoft_, Apr 14 2016
		

References

  • R. N. Cahn, Semi-Simple Lie Algebras and Their Representations, Dover, NY, 2006, ISBN 0-486-44999-8, p. 139.

Crossrefs

Cf. A000330 (row sums), A004736, A057059, A070543.
A144112, A051340, A141419, A185874, A185875, A185876 are accumulation chain related.
A141418 is a variant.
Cf. A001227, A209260. - Hartmut F. W. Hoft, Apr 14 2016
A109814, A212652, A270877, A286013 relate to where each natural number appears in this sequence.
A000027, A000217, A000326, A005449, A045943, A059845, A115067, A140090, A140091, A140672 are rows, columns or diagonals - refer to comments.

Programs

  • Haskell
    a141419 n k =  k * (2 * n - k + 1) `div` 2
    a141419_row n = a141419_tabl !! (n-1)
    a141419_tabl = map (scanl1 (+)) a004736_tabl
    -- Reinhard Zumkeller, Aug 04 2014
  • Maple
    a:=(n,k)->k*n-binomial(k,2): seq(seq(a(n,k),k=1..n),n=1..12); # Muniru A Asiru, Oct 14 2018
  • Mathematica
    T[n_, m_] = m*(2*n - m + 1)/2; a = Table[Table[T[n, m], {m, 1, n}], {n, 1, 10}]; Flatten[a]

Formula

t(n,m) = m*(2*n - m + 1)/2.
t(n,m) = A000217(n) - A000217(n-m). - L. Edson Jeffery, Jan 16 2013
Let v = d*h with h odd be an integer factorization, then v = t(d+(h-1)/2, h) if h+1 <= 2*d, and v = t(d+(h-1)/2, 2*d) if h+1 > 2*d; see A209260. - Hartmut F. W. Hoft, Apr 14 2016
G.f.: y*(-x + y)/((-1 + x)^2*(-1 + y)^3). - Stefano Spezia, Oct 14 2018
T(n, 2) = A060747(n) for n > 1. T(n, 3) = A008585(n - 1) for n > 2. T(n, 4) = A016825(n - 2) for n > 3. T(n, 5) = A008587(n - 2) for n > 4. T(n, 6) = A016945(n - 3) for n > 5. T(n, 7) = A008589(n - 3) for n > 6. T(n, 8) = A017113(n - 4) for n > 7.r n > 5. T(n, 7) = A008589(n - 3) for n > 6. T(n, 8) = A017113(n - 4) for n > 7. T(n, 9) = A008591(n - 4) for n > 8. T(n, 10) = A017329(n - 5) for n > 9. T(n, 11) = A008593(n - 5) for n > 10. T(n, 12) = A017593(n - 6) for n > 11. T(n, 13) = A008595(n - 6) for n > 12. T(n, 14) = A147587(n - 7) for n > 13. T(n, 15) = A008597(n - 7) for n > 14. T(n, 16) = A051062(n - 8) for n > 15. T(n, 17) = A008599(n - 8) for n > 16. - Stefano Spezia, Oct 14 2018
T(2*n-k, k) = A070543(n, k). - Peter Munn, Aug 21 2019

Extensions

Simpler name by Stefano Spezia, Oct 14 2018

A037227 If n = 2^m*k, k odd, then a(n) = 2*m+1.

Original entry on oeis.org

1, 3, 1, 5, 1, 3, 1, 7, 1, 3, 1, 5, 1, 3, 1, 9, 1, 3, 1, 5, 1, 3, 1, 7, 1, 3, 1, 5, 1, 3, 1, 11, 1, 3, 1, 5, 1, 3, 1, 7, 1, 3, 1, 5, 1, 3, 1, 9, 1, 3, 1, 5, 1, 3, 1, 7, 1, 3, 1, 5, 1, 3, 1, 13, 1, 3, 1, 5, 1, 3, 1, 7, 1, 3, 1, 5, 1, 3, 1, 9, 1, 3, 1, 5, 1, 3, 1, 7, 1, 3, 1, 5, 1, 3, 1, 11, 1, 3, 1, 5, 1, 3
Offset: 1

Views

Author

Keywords

Comments

Take the number of rightmost zeros in the binary expansion of n, double it, and increment it by 1. - Ralf Stephan, Aug 22 2013
Gives the maximum possible number of n X n complex Hermitian matrices with the property that all of their nonzero real linear combinations are nonsingular (see Adams et al. reference). - Nathaniel Johnston, Dec 11 2013

Crossrefs

Programs

  • Haskell
    a037227 = (+ 1) . (* 2) . a007814  -- Reinhard Zumkeller, Jun 30 2012
    
  • Magma
    [2*Valuation(n, 2)+1: n in [1..120]]; // Vincenzo Librandi, Jun 19 2019
    
  • Maple
    nmax:=102: 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):= 2*p+1: od: od: seq(a(n), n=1..nmax);  # Johannes W. Meijer, Feb 07 2013
  • Mathematica
    a[n_] := Sum[(-1)^(d+1)*MoebiusMu[d]*DivisorSigma[0, n/d], {d, Divisors[n]}]; Table[a[n], {n, 1, 102}] (* Jean-François Alcover, Dec 31 2012, after Vladeta Jovovic *)
    f[n_]:=Module[{z=Last[Split[IntegerDigits[n,2]]]},If[Union[z]={0},2* Length[ z]+1,1]]; Array[f,110] (* Harvey P. Dale, Jun 16 2019, after Ralf Stephan *)
    Table[2 IntegerExponent[n, 2] + 1, {n, 120}] (* Vincenzo Librandi, Jun 19 2019 *)
  • PARI
    a(n)=2*valuation(n,2)+1 \\ Charles R Greathouse IV, May 21 2015
    
  • Python
    def A037227(n): return ((~n & n-1).bit_length()<<1)+1 # Chai Wah Wu, Jul 05 2022
  • R
    maxrow <- 6 # by choice
    a <- 1
    for(m in 0:maxrow){
    for(k in 0:(2^m-1)) {
       a[2^(m+1)    +k] <- a[2^m+k]
       a[2^(m+1)+2^m+k] <- a[2^m+k]
    }
       a[2^(m+1)      ] <- a[2^(m+1)] + 2
    }
    a
    # Yosu Yurramendi, May 21 2015
    

Formula

a(n) = Sum_{d divides n} (-1)^(d+1)*mu(d)*tau(n/d). Multiplicative with a(p^e) = 2*e+1 if p = 2; 1 if p > 2. - Vladeta Jovovic, Apr 27 2003
a(n) = a(n-1)+(-1)^n*(a(floor(n/2))+1). - Vladeta Jovovic, Apr 27 2003
a(2*n) = a(n) + 2, a(2*n+1) = 1. a(n) = 2*A007814(n) + 1. - Ralf Stephan, Oct 07 2003
a(A005408(n)) = 1; a(A016825(n)) = 3; A017113(a(n)) = 5; A051062(a(n)) = 7. - Reinhard Zumkeller, Jun 30 2012
a((2*n-1)*2^p) = 2*p+1, p >= 0 and n >= 1. - Johannes W. Meijer, Feb 07 2013
From Peter Bala, Feb 07 2016: (Start)
a(n) = ( A002487(n-1) + A002487(n+1) )/A002487(n).
a(n*2^(k+1) + 2^k) = 2*k + 1 for n,k >= 0; thus a(2*n+1) = 1, a(4*n+2) = 3, a(8*n+4) = 5, a(16*n+8) = 7 and so on. Note the square array ( n*2^(k+1) + 2^k - 1 )n, k>=0 is the transpose of A075300.
G.f.: Sum_{n >= 0} (2*n + 1)*x^(2^n)/(1 - x^(2^(n+1))). (End)
a(n) = 2*floor(A002487(n-1)/A002487(n))+1 for n > 1. - I. V. Serov, Jun 15 2017
From Amiram Eldar, Nov 29 2022: (Start)
Dirichlet g.f.: zeta(s)*(2^s+1)/(2^s-1).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3. (End)

Extensions

More terms from Erich Friedman

A003484 Radon function, also called Hurwitz-Radon numbers.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

This sequence and A006519 (greatest power of 2 dividing n) are very similar, the difference being all zeros except for every 16th term (see A101119 for nonzero differences). - Simon Plouffe, Dec 02 2004
For all n congruent to 2^k (mod 2^(k+1)), a(n) is the same. Therefore, for any natural number m, the list of the first 2^m - 1 terms is palindromic. - Ivan N. Ianakiev, Jul 21 2019
Named after the Austrian mathematician Johann Radon (1887-1956) and the German mathematician Adolf Hurwitz (1859-1919). - Amiram Eldar, Jun 15 2021

Examples

			G.f. = x + 2*x^2 + x^3 + 4*x^4 + x^5 + 2*x^6 + x^7 + 8*x^8 + x^9 + ...
		

References

  • T. Y. Lam, The Algebraic Theory of Quadratic Forms. Benjamin, Reading, MA, 1973, p. 131.
  • Takashi Ono, Variations on a Theme of Euler, Plenum, NY, 1994, p. 192.
  • A. R. Rajwade, Squares, Camb. Univ. Press, London Math. Soc. Lecture Notes Series 171, 1993; see p. 127.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A053381 for a closely related sequence.

Programs

  • Haskell
    a003484 n = 2 * e + cycle [1,0,0,2] !! e  where e = a007814 n
    -- Reinhard Zumkeller, Mar 11 2012
    
  • Maple
    readlib(ifactors): for n from 1 to 150 do if n mod 2 = 1 then printf(`%d,`,1) fi: if n mod 2 = 0 then m := ifactors(n)[2][1][2]: if m mod 4 = 0 then printf(`%d,`,2*m+1) fi: if m mod 4 = 1 then printf(`%d,`,2*m) fi: if m mod 4 = 2 then printf(`%d,`,2*m) fi: if m mod 4 = 3 then printf(`%d,`,2*m+2) fi: fi: od: # James Sellers, Dec 07 2000
    nmax:=102; A003485 := proc(n): A003485(n) := ceil((n+1)/4) + ceil(n/4) + 2*ceil((n-1)/4) + 4*ceil((n-2)/4) end: A029837 := n -> ceil(simplify(log[2](n))): for p from 0 to A029837(nmax) do for n from 1 to ceil(nmax/(p+2)) do A003484((2*n-1)*2^p):= A003485(p): od: od: seq(A003484(n), n=1..nmax); # Johannes W. Meijer, Jun 07 2011, Dec 15 2012
  • Mathematica
    a[n_] := 8*Quotient[IntegerExponent[n, 2], 4] + 2^Mod[IntegerExponent[n, 2], 4]; Table[a[n], {n, 1, 102}] (* Jean-François Alcover, Sep 08 2011, after Paul D. Hanna *)
  • PARI
    a(n)=8*(valuation(n,2)\4)+2^(valuation(n,2)%4) /* Paul D. Hanna, Dec 02 2004 */
    
  • Python
    def A003484(n): return (((m:=(~n&n-1).bit_length())&-4)<<1)+(1<<(m&3)) # Chai Wah Wu, Jul 09 2022

Formula

a(n) = A003485(A007814(n)).
If n=2^(4*b+c)*d, 0<=c<=3, d odd, then a(n) = 8*b + 2^c.
If n=2^m*d, d odd, then a(n) = 2*m+1 if m=0 mod 4, a(n) = 2*m if m=1 or 2 mod 4, a(n) = 2*m+2 (otherwise, i.e., if m=3 mod 4).
Multiplicative with a(p^e) = 2e + a_(e mod 4) if p = 2; 1 if p > 2; where a = (1, 0, 0, 2). - David W. Wilson, Aug 01 2001
Dirichlet g.f. zeta(s) *(1-1/2^s)* {7*2^(-4*s) +1 +2^(3-3*s) +3*2^(1-5*s) +2^(1-s) +2^(2-6*s) +2^(2-2*s) }/ (1-2^(-4*s))^2. - R. J. Mathar, Mar 04 2011
a(A005408(n))=1; a(2*n) = A209675(n); a(A016825(n))=2; a(A017113(n))=4; a(A051062(n))=8. - Reinhard Zumkeller, Mar 11 2012
a((2*n-1)*2^p) = A003485(p), p >=0. - Johannes W. Meijer, Jun 07 2011, Dec 15 2012
Lambert series g.f. Sum_(k >=0) q^(2^(4*k))/(1-q^(2^(4*k))) +q^(2^(4*k+1))/(1-q^(2^(4*k+1))) +2*q^(2^(4*k+2))/(1-q^(2^(4*k+2))) +4*q^(2^(4*k+3))/(1-q^(2^(4*k+3))). - Mamuka Jibladze, Dec 07 2016
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 8/3. - Amiram Eldar, Oct 22 2022

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Mar 20 2000

A106839 Numbers congruent to 11 mod 16.

Original entry on oeis.org

11, 27, 43, 59, 75, 91, 107, 123, 139, 155, 171, 187, 203, 219, 235, 251, 267, 283, 299, 315, 331, 347, 363, 379, 395, 411, 427, 443, 459, 475, 491, 507, 523, 539, 555, 571, 587, 603, 619, 635, 651, 667, 683, 699, 715, 731, 747, 763, 779, 795, 811, 827, 843
Offset: 0

Views

Author

Ralf Stephan, May 03 2005

Keywords

Crossrefs

Differs from A044072.

Programs

Formula

G.f.: x*(11+5*x)/(x-1)^2. - R. J. Mathar, Oct 08 2011
From Vincenzo Librandi, Oct 10 2011: (Start)
a(n) = 11 + 16*n.
a(n) = 32*n - a(n-1) + 6, a(0)=11. (End)
From Elmo R. Oliveira, Apr 03 2025: (Start)
E.g.f.: exp(x)*(11 + 16*x).
a(n) = 2*a(n-1) - a(n-2).
a(n) = A017101(2*n+1). (End)

A228441 G.f.: Sum_{k>0} -(-x)^k / (1 + x^k).

Original entry on oeis.org

1, -2, 2, -1, 2, -4, 2, 0, 3, -4, 2, -2, 2, -4, 4, 1, 2, -6, 2, -2, 4, -4, 2, 0, 3, -4, 4, -2, 2, -8, 2, 2, 4, -4, 4, -3, 2, -4, 4, 0, 2, -8, 2, -2, 6, -4, 2, 2, 3, -6, 4, -2, 2, -8, 4, 0, 4, -4, 2, -4, 2, -4, 6, 3, 4, -8, 2, -2, 4, -8, 2, 0, 2, -4, 6, -2, 4
Offset: 1

Views

Author

Michael Somos, Nov 02 2013

Keywords

Examples

			G.f. = x - 2*x^2 + 2*x^3 - x^4 + 2*x^5 - 4*x^6 + 2*x^7 + 3*x^9 - 4*x^10 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ Sum[ -(-x)^k / (1 + x^k), {k, 1, n}], {x, 0, n}];
    a[ n_] := If[ n < 1, 0, DivisorSum[ n, (-1)^(# + n/#) &]]; (* Michael Somos, Jan 08 2015 *)
    a[n_] := Module[{e = IntegerExponent[n, 2]}, DivisorSigma[0, n] * If[e == 0, 1, (e-3)/(e+1)]]; Array[a, 100] (* Amiram Eldar, Sep 18 2023 *)
  • PARI
    {a(n) = if( n<1, 0, sumdiv(n, k, (-1)^(k + n/k)))};
    
  • PARI
    {a(n) = if( n<1, 0, numdiv(n) - 4 * sumdiv( n, k, k%4 == 2))};
    
  • PARI
    {a(n) = my(e); if( n<1, 0, e = valuation( n, 2); numdiv( n/2^e) * if( e>0, e-3, 1))};
    
  • PARI
    a(n)=direuler(p=1,n,if(p==2,(1-2*X)^2/(1-X)^2,1/(1-X)^2))[n] /* Ralf Stephan, Mar 27 2015 */

Formula

a(n) = number of divisors of n minus 4 times number of divisors of n of the form 4*k+2.
a(n) = Sum_{d|n} (-1)^(d+n/d). - N. J. A. Sloane, Nov 23 2018
Multiplicative with a(2^e) = e-3 if e>0, a(p^e) = e+1 if p>2.
Moebius transform is period 4 sequence [1, -3, 1, 1, ...].
G.f.: Sum_{k>0} x^k / (1 - x^k) - 4 * x^(4*k + 2) / (1 - x^(4*k + 2)).
a(2*n - 1) = A099774(n).
Dirichlet g.f.: zeta(s)^2*(1-2^(-s+1))^2 = eta^2(s) (the Dirichlet eta). - Ralf Stephan, Mar 27 2015
a(16n+8) = a(A051062(n)) = 0. - Michel Marcus, Mar 27 2015
O.g.f.: Sum_{n >= 1} (-1)^(n*(n+1))*x^(n^2)*(1 - x^n)/(1 + x^n). - Peter Bala, Mar 11 2019
Conjecture: a(n) = (7 - 2*(-1)^n)*tau(n) - 4*tau(2*n) = 5*tau(n) - (3 + (-1)^n)*tau(2*n), where tau = A000005. - Velin Yanev, Dec 17 2019
The proof of the above conjecture easily follows from the fact that both a(n) and tau(n) are multiplicative arithmetical functions and tau(p^e) = e + 1 for prime p. - Peter Bala, Jan 28 2022
a(n) = A000005(n) if n is odd, and A000005(n) * (A007814(n)-3)/(A007814(n)+1) if n is even. - Amiram Eldar, Sep 18 2023

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

A376418 a(n) = n - A276086(A276085(n)), where A276085 and A276086 are primorial base log and exp-functions.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 5, 0, 0, 0, 6, 0, 0, 22, 7, 0, 0, 0, 14, 0, 0, 0, 31, 0, 0, 0, 10, 0, 0, 0, 11, 0, 0, 0, 43, 0, 0, 0, 13, 0, 44, 0, 14, 0, 0, 0, 15, 0, 0, 0, 59, 0, 0, 0, 17, 0, 0, 0, 62, 0, 0, 0, 19, 0, 0, 0, 35, 66, 0, 0, 21, 0, 0, 0, 22, 0, 0, 0, 23, 0, 0, 0, 86, 0, 0, 0, 25
Offset: 1

Views

Author

Antti Karttunen, Nov 03 2024

Keywords

Comments

All terms are nonnegative because for all n, x = A276086(A276085(n)) <= n, as any factor prime(i)^k || n (with k >= prime(i)) will propagate carries (in the image of fully additive A276085) towards more significant digit positions, which A276086 will convert back to the exponents of larger primes, but for each new instance of such larger prime present in x, enough instances of smaller primes in n have been eliminated (by the carry process) so that the net change of magnitude is negative, unless there are no such factors present at all in n (i.e., when n is a term of A048103), then A276086(A276085(n)) = n, and a(n) = 0.
This implies also that the least k for which A276085(k) = n is k = A276086(n).
There are several conspicuous patterns among the terms. For example, for n = 392, 3992, 39992, 399992, 3999992, ..., a(n) = 98, 998, 9998, 99998, 999998, ..., = n/4, but this holds only if n/8 is not in A100716, as generally, for all terms x that are in the intersection of A051062 and A168183 and x/8 is in A048103, it follows that a(x) = x/4. There are many other similar identities.
Differs from similar A376417 for the first time at n=625, 1250, 1875, 2500, 3125, 3375, 3750, 4375, 4500, 5000, 5625, ...

Examples

			a(4) = 1, as 4 = prime(1)^2, thus A276085(4) = 2 * A002110(1-1) = 2, and A276086(2) = prime(2) = 3, and 4-3 = 1.
a(625) = 0, as 625 = prime(3)^4, thus A276085(625) = 4 * A002110(3-1) = 4*6 = 24, and A276086(24) = prime(3)^4 [because A049345(24) = 400] = 625, and 625-625 = 0.
a(2500) = 625, as 2500 = 2^2 * 5^4 = prime(1)^2 * prime(3)^4, thus A276085(2500) = 2 * A002110(1-1) + 4 * A002110(3-1) = 2*1 + 4*6 = 26, but on the other hand, A276086(26) = prime(2) * prime(3)^4 [because A049345(26) = 410] = 3 * 5^4 = 1875, and 2500 - 1875 = 625.
a(3999999992) = 999999998, as 3999999992 = 2^3 * 691 * 723589 = prime(1)^3 * prime(125) * prime(58312), thus x = A276085(3999999992) = A002110(1-1) + A002110(2-1) + A002110(125-1) + A002110(58312-1), so A276086(x) = prime(1) * prime(2) * prime(125) * prime(58312), therefore a(3999999992) = (8-6)*prime(125)*prime(58312) = 3999999992/4 = 999999998. Note that A049345(8) = "110", as 8 = 6+2.
		

Crossrefs

Cf. A049345, A048103 (indices of 0's), A100716 (of terms > 0), A276085, A276086, A376417.

Programs

  • PARI
    A276085(n) = { my(f=factor(n)); sum(k=1, #f~, f[k, 2]*prod(i=1,primepi(f[k, 1]-1),prime(i))); };
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A376418(n) = (n - A276086(A276085(n)));
Showing 1-10 of 16 results. Next