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-8 of 8 results.

A124241 Terms of A068563 that are not terms of A124240.

Original entry on oeis.org

136, 408, 620, 680, 820, 1224, 1240, 1314, 2040, 2312, 2460, 2480, 2628, 2856, 3100, 3400, 3672, 3924, 3942, 4100, 4112, 4656, 4960, 5304, 5334, 5784, 6120, 6200, 6820, 6936, 7380, 7480, 7848, 7884, 8224, 8568, 9020, 9060, 9198, 9492, 9920, 10200, 10668, 11016, 11560, 11568, 11826, 12300, 12336, 12400, 13140, 13640
Offset: 1

Views

Author

Alexander Adamchuk, Oct 22 2006, Oct 27 2006

Keywords

Comments

A068563 contains A124240 as a subsequence. This sequence gives their set difference.
Note that a(2) = 3*a(1) and a(4) = 5*a(1). a(6) = 1224 = 9*a(1), a(7) = 1240 = 2*a(3), a(8) = 1314, a(9) = 2040 = 15*a(1), a(10) = 2312 = 17*a(1), a(11) = 2460 = 3*a(5), a(12)= 2480 = 4*a(3), a(13) = 2856 = 21*a(1). Numbers k such that there exists a(n) = k*a(1) are k = {1, 3, 5, 9, 15, 17, 21, ...}.
Many but not all terms belong to A124276.

Crossrefs

Programs

  • PARI
    for(n=1,10^5, m=n\2^valuation(n,2); if( Mod(n,znorder(Mod(2,m))), next); p=factor(n)[,1]; g=1; for(i=1,#p, if( Mod(n,p[i]-1), g=0; break) ); if(g,next); print1(n,", ") ) /* Alekseyev */

Extensions

a(13) corrected and terms a(14) onward provided by Max Alekseyev, Aug 25 2013

A124276 Terms k of A068563 such that k/2 is not a term of A068563.

Original entry on oeis.org

1, 6, 18, 20, 42, 54, 60, 100, 126, 136, 156, 162, 180, 220, 294, 300, 342, 378, 408, 420, 468, 486, 500, 540, 620, 660, 680, 780, 820, 882, 900, 1026, 1092, 1100, 1134, 1224, 1260, 1314, 1332, 1404, 1458, 1500, 1620, 1806, 1860, 1980, 2028, 2040, 2058, 2100
Offset: 1

Views

Author

Alexander Adamchuk, Oct 23 2006

Keywords

Comments

A068563 are the numbers n such that 2^n (mod n) = 4^n (mod n). If k is in the sequence A068563 then 2k is also in the sequence A068563, but if 2m is in the sequence A068563 m is not necessarily a term of the sequence A068563.

Examples

			A068563 begins 1, 2, 4, 6, 8, 12, 16, 18, 20, 24, 32, 36, 40, 42, ... .
Thus a(0) = 1, a(1) = 6, a(2) = 18, a(3) = 20, a(4) = 42 because 1/2, 3, 9, 10, 21 are not the terms of A068563.
		

Crossrefs

Cf. A068563.

Programs

  • Maple
    a:= proc(n) option remember; local k;
          for k from `if`(n=1, 1, a(n-1)+1)
          while (2&^k mod k <> 4&^k mod k) or
             (irem(k, 2, 'r')=0 and (2&^r mod r = 4&^r mod r))
          do od; k
        end:
    seq(a(n), n=1..50);  # Alois P. Heinz, May 16 2013
  • Mathematica
    Prepend[Select[Range[2, 2100], (PowerMod[2, #, #] == PowerMod[4, #, #]) && ! (PowerMod[2, #/2, #/2] == PowerMod[4, #/2, #/2]) &], 1]

A000265 Remove all factors of 2 from n; or largest odd divisor of n; or odd part of n.

Original entry on oeis.org

1, 1, 3, 1, 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15, 1, 17, 9, 19, 5, 21, 11, 23, 3, 25, 13, 27, 7, 29, 15, 31, 1, 33, 17, 35, 9, 37, 19, 39, 5, 41, 21, 43, 11, 45, 23, 47, 3, 49, 25, 51, 13, 53, 27, 55, 7, 57, 29, 59, 15, 61, 31, 63, 1, 65, 33, 67, 17, 69, 35, 71, 9, 73, 37, 75, 19, 77
Offset: 1

Views

Author

Keywords

Comments

When n > 0 is written as k*2^j with k odd then k = A000265(n) and j = A007814(n), so: when n is written as k*2^j - 1 with k odd then k = A000265(n+1) and j = A007814(n+1), when n > 1 is written as k*2^j + 1 with k odd then k = A000265(n-1) and j = A007814(n-1).
Also denominator of 2^n/n (numerator is A075101(n)). - Reinhard Zumkeller, Sep 01 2002
Slope of line connecting (o, a(o)) where o = (2^k)(n-1) + 1 is 2^k and (by design) starts at (1, 1). - Josh Locker (joshlocker(AT)macfora.com), Apr 17 2004
Numerator of n/2^(n-1). - Alexander Adamchuk, Feb 11 2005
From Marco Matosic, Jun 29 2005: (Start)
"The sequence can be arranged in a table:
1
1 3 1
1 5 3 7 1
1 9 5 11 3 13 7 15 1
1 17 9 19 5 21 11 23 3 25 13 27 7 29 15 31 1
Every new row is the previous row interspaced with the continuation of the odd numbers.
Except for the ones; the terms (t) in each column are t+t+/-s = t_+1. Starting from the center column of threes and working to the left the values of s are given by A000265 and working to the right by A000265." (End)
This is a fractal sequence. The odd-numbered elements give the odd natural numbers. If these elements are removed, the original sequence is recovered. - Kerry Mitchell, Dec 07 2005
2k + 1 is the k-th and largest of the subsequence of k terms separating two successive equal entries in a(n). - Lekraj Beedassy, Dec 30 2005
It's not difficult to show that the sum of the first 2^n terms is (4^n + 2)/3. - Nick Hobson, Jan 14 2005
In the table, for each row, (sum of terms between 3 and 1) - (sum of terms between 1 and 3) = A020988. - Eric Desbiaux, May 27 2009
This sequence appears in the analysis of A160469 and A156769, which resemble the numerator and denominator of the Taylor series for tan(x). - Johannes W. Meijer, May 24 2009
Indices n such that a(n) divides 2^n - 1 are listed in A068563. - Max Alekseyev, Aug 25 2013
From Alexander R. Povolotsky, Dec 17 2014: (Start)
With regard to the tabular presentation described in the comment by Marco Matosic: in his drawing, starting with the 3rd row, the first term in the row, which is equal to 1 (or, alternatively the last term in the row, which is also equal to 1), is not in the actual sequence and is added to the drawing as a fictitious term (for the sake of symmetry); an actual A000265(n) could be considered to be a(j,k) (where j >= 1 is the row number and k>=1 is the column subscript), such that a(j,1) = 1:
1
1 3
1 5 3 7
1 9 5 11 3 13 7 15
1 17 9 19 5 21 11 23 3 25 13 27 7 29 15 31
and so on ... .
The relationship between k and j for each row is 1 <= k <= 2^(j-1). In this corrected tabular representation, Marco's notion that "every new row is the previous row interspaced with the continuation of the odd numbers" remains true. (End)
Partitions natural numbers to the same equivalence classes as A064989. That is, for all i, j: a(i) = a(j) <=> A064989(i) = A064989(j). There are dozens of other such sequences (like A003602) for which this also holds: In general, all sequences for which a(2n) = a(n) and the odd bisection is injective. - Antti Karttunen, Apr 15 2017
From Paul Curtz, Feb 19 2019: (Start)
This sequence is the truncated triangle:
1, 1;
3, 1, 5;
3, 7, 1, 9;
5, 11, 3, 13, 7;
15, 1, 17, 9, 19, 5;
21, 11, 23, 3, 25, 13, 27;
7, 29, 15, 31, 1, 33, 17, 35;
...
The first column is A069834. The second column is A213671. The main diagonal is A236999. The first upper diagonal is A125650 without 0.
c(n) = ((n*(n+1)/2))/A069834 = 1, 1, 2, 2, 1, 1, 4, 4, 1, 1, 2, 2, 1, 1, 8, 8, 1, 1, ... for n > 0. n*(n+1)/2 is the rank of A069834. (End)
As well as being multiplicative, a(n) is a strong divisibility sequence, that is, gcd(a(n),a(m)) = a(gcd(n,m)) for n, m >= 1. In particular, a(n) is a divisibility sequence: if n divides m then a(n) divides a(m). - Peter Bala, Feb 27 2019
a(n) is also the map n -> A026741(n) applied at least A007814(n) times. - Federico Provvedi, Dec 14 2021

Examples

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

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A049606 (partial products), A135013 (partial sums), A099545 (mod 4), A326937 (Dirichlet inverse).
Cf. A026741 (map), A001511 (converging steps), A038550 (prime index).
Cf. A195056 (Dgf at s=3).

Programs

  • Haskell
    a000265 = until odd (`div` 2)
    -- Reinhard Zumkeller, Jan 08 2013, Apr 08 2011, Oct 14 2010
    
  • Java
    int A000265(n){
        while(n%2==0) n>>=1;
        return n;
    }
    /* Aidan Simmons, Feb 24 2019 */
    
  • Julia
    using IntegerSequences
    [OddPart(n) for n in 1:77] |> println  # Peter Luschny, Sep 25 2021
    
  • Magma
    A000265:= func< n | n/2^Valuation(n,2) >;
    [A000265(n): n in [1..120]]; // G. C. Greubel, Jul 31 2024
    
  • Maple
    A000265:=proc(n) local t1,d; t1:=1; for d from 1 by 2 to n do if n mod d = 0 then t1:=d; fi; od; t1; end: seq(A000265(n), n=1..77);
    A000265 := n -> n/2^padic[ordp](n,2): seq(A000265(n), n=1..77); # Peter Luschny, Nov 26 2010
  • Mathematica
    a[n_Integer /; n > 0] := n/2^IntegerExponent[n, 2]; Array[a, 77] (* Josh Locker *)
    a[ n_] := If[ n == 0, 0, n / 2^IntegerExponent[ n, 2]]; (* Michael Somos, Dec 17 2014 *)
  • PARI
    {a(n) = n >> valuation(n, 2)}; /* Michael Somos, Aug 09 2006, edited by M. F. Hasler, Dec 18 2014 */
    
  • Python
    from _future_ import division
    def A000265(n):
        while not n % 2:
            n //= 2
        return n # Chai Wah Wu, Mar 25 2018
    
  • Python
    def a(n):
        while not n&1: n >>= 1
        return n
    print([a(n) for n in range(1, 78)]) # Michael S. Branicky, Jun 26 2025
    
  • SageMath
    def A000265(n): return n//2^valuation(n,2)
    [A000265(n) for n in (1..121)] # G. C. Greubel, Jul 31 2024
  • Scheme
    (define (A000265 n) (let loop ((n n)) (if (odd? n) n (loop (/ n 2))))) ;; Antti Karttunen, Apr 15 2017
    

Formula

a(n) = if n is odd then n, otherwise a(n/2). - Reinhard Zumkeller, Sep 01 2002
a(n) = n/A006519(n) = 2*A025480(n-1) + 1.
Multiplicative with a(p^e) = 1 if p = 2, p^e if p > 2. - David W. Wilson, Aug 01 2001
a(n) = Sum_{d divides n and d is odd} phi(d). - Vladeta Jovovic, Dec 04 2002
G.f.: -x/(1 - x) + Sum_{k>=0} (2*x^(2^k)/(1 - 2*x^(2^(k+1)) + x^(2^(k+2)))). - Ralf Stephan, Sep 05 2003
(a(k), a(2k), a(3k), ...) = a(k)*(a(1), a(2), a(3), ...) In general, a(n*m) = a(n)*a(m). - Josh Locker (jlocker(AT)mail.rochester.edu), Oct 04 2005
a(n) = Sum_{k=0..n} A127793(n,k)*floor((k+2)/2) (conjecture). - Paul Barry, Jan 29 2007
Dirichlet g.f.: zeta(s-1)*(2^s - 2)/(2^s - 1). - Ralf Stephan, Jun 18 2007
a(A132739(n)) = A132739(a(n)) = A132740(n). - Reinhard Zumkeller, Aug 27 2007
a(n) = 2*A003602(n) - 1. - Franklin T. Adams-Watters, Jul 02 2009
a(n) = n/gcd(2^n,n). (This also shows that the true offset is 0 and a(0) = 0.) - Peter Luschny, Nov 14 2009
a(-n) = -a(n) for all n in Z. - Michael Somos, Sep 19 2011
From Reinhard Zumkeller, May 01 2012: (Start)
A182469(n, k) = A027750(a(n), k), k = 1..A001227(n).
a(n) = A182469(n, A001227(n)). (End)
a((2*n-1)*2^p) = 2*n - 1, p >= 0 and n >= 1. - Johannes W. Meijer, Feb 05 2013
G.f.: G(0)/(1 - 2*x^2 + x^4) - 1/(1 - x), where G(k) = 1 + 1/(1 - x^(2^k)*(1 - 2*x^(2^(k+1)) + x^(2^(k+2)))/(x^(2^k)*(1 - 2*x^(2^(k+1)) + x^(2^(k+2))) + (1 - 2*x^(2^(k+2)) + x^(2^(k+3)))/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Aug 06 2013
a(n) = A003961(A064989(n)). - Antti Karttunen, Apr 15 2017
Completely multiplicative with a(2) = 1 and a(p) = p for prime p > 2, i.e., the sequence b(n) = a(n) * A008683(n) for n > 0 is the Dirichlet inverse of a(n). - Werner Schulte, Jul 08 2018
From Peter Bala, Feb 27 2019: (Start)
O.g.f.: F(x) - F(x^2) - F(x^4) - F(x^8) - ..., where F(x) = x/(1 - x)^2 is the generating function for the positive integers.
O.g.f. for reciprocals: Sum_{n >= 1} x^n/a(n) = L(x) + (1/2)*L(x^2) + (1/2)*L(x^4) + (1/2)*L(x^8) + ..., where L(x) = log(1/(1 - x)).
Sum_{n >= 1} x^n/a(n) = 1/2*log(G(x)), where G(x) = 1 + 2*x + 4*x^2 + 6*x^3 + 10*x^4 + ... is the o.g.f. of A000123. (End)
O.g.f.: Sum_{n >= 1} phi(2*n-1)*x^(2*n-1)/(1 - x^(2*n-1)), where phi(n) is the Euler totient function A000010. - Peter Bala, Mar 22 2019
a(n) = A049606(n) / A049606(n-1). - Flávio V. Fernandes, Dec 08 2020
a(n) = numerator of n/2^(floor(n/2)). - Federico Provvedi, Dec 14 2021
a(n) = Sum_{d divides n} (-1)^(d+1)*phi(2*n/d). - Peter Bala, Jan 14 2024
a(n) = A030101(A030101(n)). - Darío Clavijo, Sep 19 2024

Extensions

Additional comments from Henry Bottomley, Mar 02 2000
More terms from Larry Reeves (larryr(AT)acm.org), Mar 14 2000
Name clarified by David A. Corneth, Apr 15 2017

A007733 Period of binary representation of 1/n. Also, multiplicative order of 2 modulo the odd part of n (= A000265(n)).

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 3, 1, 6, 4, 10, 2, 12, 3, 4, 1, 8, 6, 18, 4, 6, 10, 11, 2, 20, 12, 18, 3, 28, 4, 5, 1, 10, 8, 12, 6, 36, 18, 12, 4, 20, 6, 14, 10, 12, 11, 23, 2, 21, 20, 8, 12, 52, 18, 20, 3, 18, 28, 58, 4, 60, 5, 6, 1, 12, 10, 66, 8, 22, 12, 35, 6, 9, 36, 20, 18, 30, 12, 39, 4, 54, 20, 82, 6
Offset: 1

Views

Author

N. J. A. Sloane, Hal Sampson (hals(AT)easynet.com)

Keywords

Comments

Also sequence of period lengths for n's when you do primality testing and calculate "2^k mod n" from k = 0..n. - Gottfried Helms, Oct 05 2000
Fractal sequence related to A002326: the even terms of this sequence are this sequence itself, constructed on A002326, whose terms are the odd terms of this sequence. - Alexandre Wajnberg, Apr 27 2005
It seems that a(n) is also the sum of the terms in one period of the base-2 MR-expansion of 1/n (see A136042 for definition). - John W. Layman, Jan 22 2009
Indices n such that a(n) divides n are listed in A068563. - Max Alekseyev, Aug 25 2013
a(n) is the smallest k such that x^n - 1 factors into n linear polynomials over GF(2^k). For example, a(12) = 2, and x^12 - 1 = (x - 1)^4*(x - w)^4*(x - (w + 1))^4 in GF(4), where w^2 + w + 1 = 0. - Jianing Song, Jan 20 2019

References

  • Simmons, G. J. The structure of the differentiation digraphs of binary sequences. Ars Combin. 35 (1993), A, 71-88, see Table 2. Math. Rev. 95f:05052.

Crossrefs

Cf. A136042. - John W. Layman, Jan 22 2009
Positions of records are A139099.

Programs

  • Haskell
    a007733 = a002326 . flip div 2 . subtract 1 . a000265
    -- Reinhard Zumkeller, Apr 13 2015
    
  • Mathematica
    f[n_] := MultiplicativeOrder[2, n/(2^IntegerExponent[n, 2])]; Array[f, 84] (* Robert G. Wilson v, Jun 10 2011 *)
  • PARI
    a(n) = znorder(Mod(2, n/2^valuation(n, 2))); \\ Michel Marcus, Apr 11 2015
    
  • Python
    from sympy.ntheory import n_order
    def A007733(n): return n_order(2,n>>(~n & n-1).bit_length()) # Chai Wah Wu, Jul 01 2022

Formula

a(n) = A002326((A000265(n) - 1)/2). - Max Alekseyev, Jun 11 2009

A124240 Numbers n such that lambda(n) divides n, where lambda is Carmichael's function (A002322).

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 18, 20, 24, 32, 36, 40, 42, 48, 54, 60, 64, 72, 80, 84, 96, 100, 108, 120, 126, 128, 144, 156, 160, 162, 168, 180, 192, 200, 216, 220, 240, 252, 256, 272, 288, 294, 300, 312, 320, 324, 336, 342, 360, 378, 384, 400, 420, 432, 440, 468, 480
Offset: 1

Views

Author

Alexander Adamchuk, Oct 22 2006

Keywords

Comments

Numbers n such that A124239(n) is divisible by n.
If k is in the sequence then 2k is also in the sequence, but if 2m is in the sequence m is not necessarily a term of the sequence.
This sequence is a subsequence of A068563. The first term that is different is A068563(27) = 136. The terms of A068563 that are not the terms of a(n) are listed in A124241.
Also, the sequence of numbers n such that p-1 divides n for all primes p that divide n. - Leroy Quet, Jun 27 2008
Numbers n such that b^n == 1 (mod n) for every b coprime to n. - Thomas Ordowski, Jun 23 2017
Numbers m such that every divisor < m is the difference between two divisors of m. - Michel Lagneau, Aug 11 2017
All terms > 1 in this sequence are even. Furthermore, either 4 or 6 divides a(n) for n > 3. 1806 is the largest squarefree term. - Paul Vanderveen, Apr 24 2022

Examples

			a(1) = 1 because 1 divides A124239(1) = 1.
a(2) = 2 because 2 divides A124239(2) = 14.
a(3) = 4 because 4 divides A124239(4) = 3704, but 3 does not divide A124239(3) = 197.
		

Crossrefs

Programs

  • Haskell
    a124240 n = a124240_list !! (n-1)
    a124240_list = filter
       (\x -> all (== 0) $ map ((mod x) . pred) $ a027748_row x) [1..]
    -- Reinhard Zumkeller, Aug 27 2013
    
  • Maple
    a:= proc(n) option remember; local k;
           for k from `if`(n=1, 0, a(n-1))+1 while
           irem(k, numtheory[lambda](k))>0 do od: k
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Jul 04 2021
    # Using function 'Clausen' from A160014:
    aList := m -> select(k -> irem(Clausen(k, 1), Clausen(k, 0)) = 0, [seq(1..m)]):
    aList(480); # Peter Luschny, Jun 08 2023
  • Mathematica
    Do[f=n + Sum[ (2k-1)((2k-1)^n-1) / (2(k-1)), {k,2,n} ]; If[IntegerQ[f/n],Print[n]],{n,1,900}]
    Flatten[Position[Table[n/CarmichaelLambda[n], {n, 440}], Integer]] (* _T. D. Noe, Sep 11 2008 *)
  • PARI
    is(n)=n%lcm(znstar(n)[2])==0 \\ Charles R Greathouse IV, Feb 11 2015
    
  • Python
    from itertools import islice, count
    from sympy.ntheory.factor_ import reduced_totient
    def A124240gen(): return filter(lambda n:n % reduced_totient(n) == 0,count(1))
    A124240_list = list(islice(A124240gen(),20)) # Chai Wah Wu, Dec 11 2021

Formula

k is in a <=> Clausen(k, 0) divides Clausen(k, 1), (Clausen = A160014). - Peter Luschny, Jun 08 2023

Extensions

New definition from T. D. Noe, Aug 31 2008
Edited by Max Alekseyev, Aug 25 2013

A268336 a(n) = A174824(n)/n, where A174824(n) = lcm(A002322(n), n) and A002322(n) is the Carmichael lambda function (also known as the reduced totient function or the universal exponent of n).

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 6, 1, 2, 2, 10, 1, 12, 3, 4, 1, 16, 1, 18, 1, 2, 5, 22, 1, 4, 6, 2, 3, 28, 2, 30, 1, 10, 8, 12, 1, 36, 9, 4, 1, 40, 1, 42, 5, 4, 11, 46, 1, 6, 2, 16, 3, 52, 1, 4, 3, 6, 14, 58, 1, 60, 15, 2, 1, 12, 5, 66, 4, 22, 6, 70, 1, 72, 18, 4, 9, 30, 2, 78, 1, 2
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 01 2016

Keywords

Crossrefs

Programs

  • Magma
    [1] cat [Lcm(n, CarmichaelLambda(n))/n: n in [2..100]]: // Feb 03 2016
    
  • Mathematica
    Table[LCM[n, CarmichaelLambda@ n]/n, {n, 100}] (* Michael De Vlieger, Feb 03 2016, after T. D. Noe at A174824 *)
  • PARI
    a(n)=my(ps); ps=factor(n)[, 1]~; m = n; for(k=1, #ps, m=lcm(m, ps[k]-1)); m/n \\ Michel Marcus, Feb 21 2016
    
  • PARI
    apply( {A268336(n)=lcm(lcm([p-1|p<-factor(n)[,1]]),n)/n}, [1..99]) \\ [...] = znstar(n)[2], but 3x faster. - M. F. Hasler, Nov 13 2019

Formula

a(n) = A174824(n)/n.
a(A124240(n)) = 1. - Michel Marcus, Feb 21 2016

Extensions

More terms from Vincenzo Librandi, Feb 03 2016

A124239 a(n) = Sum_{k=1..n} Sum_{m=1..n} (2*k - 1)^m.

Original entry on oeis.org

1, 14, 197, 3704, 90309, 2704470, 95856025, 3921108576, 181756280697, 9413656622446, 538727822713277, 33757715581666296, 2298714540642445405, 169016703698449309846, 13345320616706684277361, 1126219424250538393789824, 101160070702700567996590513, 9636001314414804672487492878
Offset: 1

Views

Author

Alexander Adamchuk, Oct 22 2006

Keywords

Comments

a(3) = 197 and a(11) = 538727822713277 are primes.
p divides a(p+1) for primes p > 3.
a(2*k-1) is odd. a(2*k) is even. a(2^k) is divisible by 2^(2*k - 1) for k > 0.
Numbers n such that a(n) is divisible by n are listed in A124240.

Crossrefs

Programs

  • Mathematica
    Table[Sum[(2k-1)^m,{k,1,n},{m,1,n}],{n,1,20}]
  • PARI
    a(n) = sum(k=1, n, sum(m=1, n, (2*k - 1)^m)); \\ Michel Marcus, Apr 24 2022

Formula

a(n) = Sum_{k=1..n} Sum_{m=1..n} (2*k - 1)^m.
a(n) = n + Sum_{k=2..n} (2*k - 1)*((2*k - 1)^n - 1)/(2*(k - 1)).

A338370 Numbers k such that 4^k - 2^k + 1 is a strong pseudoprime to base 2 (A001262).

Original entry on oeis.org

6, 8, 12, 16, 18, 20, 24, 36, 40, 42, 48, 54, 60, 64, 72, 80, 84, 96, 100, 108, 120, 126, 128, 136, 144, 156, 160, 162, 168, 180, 192, 200, 216, 220, 240, 252, 256, 272, 288, 294, 300, 312, 320, 324, 336, 342, 360, 378, 384, 400, 408, 420, 432, 440, 468, 480, 486
Offset: 1

Views

Author

Davide Rotondo, Oct 23 2020

Keywords

Comments

Apparently this sequence is A068563 \ {1, 2, 4, 32}. - Amiram Eldar, Oct 23 2020

Crossrefs

Showing 1-8 of 8 results.