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

A338428 Multiplicities for A111774(n), for n >= 1.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Nov 23 2020

Keywords

Comments

See the triangle and array of A337940 for details.
The first n and N(n) = A111774(n) with multiplicity m are [m, n, N] = [1, 1, 6], [2, 6, 15], [3, 16, 30], [4, 26, 45], [5, 60, 90], [6, 72, 105], [7, 157, 210], ...

Examples

			For a(6) = 2 for  A111774(6) = 15 see the example given in A337940.
Similarly for a(24) = 3 for A111774(24) = 42.
		

Crossrefs

Formula

a(n) gives the number of possibilities to write A111774(n) as a sum of at least three consecutive positive integers.

A065091 Odd primes.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277
Offset: 1

Views

Author

Labos Elemer, Nov 12 2001

Keywords

Comments

Rayes et al. prove that the a(n)-th Chebyshev-T polynomial, divided by x, is irreducible over the integers.
Odd primes can be written as a sum of no more than two consecutive positive integers. Powers of 2 do not have a representation as a sum of k consecutive positive integers (other than the trivial n=n, for k=1). See A111774. - Jaap Spies, Jan 04 2007
Intersection of A005408 and A000040. - Reinhard Zumkeller, Oct 14 2008
Primes which are the sum of two consecutive numbers. - Juri-Stepan Gerasimov, Nov 07 2009
The arithmetic mean of divisors of p^3, (1+p)(1+p^2)/4, for odd primes p is an integer. - Ctibor O. Zizka, Oct 20 2009
Primes == -+ 1 (mod 4). - Juri-Stepan Gerasimov, Apr 27 2010
a(n) = A053670(A179675(n)) and a(n) <> A053670(m) for m < A179675(n). - Reinhard Zumkeller, Jul 23 2010
Triads of the form <2*a(n+1), a(n+1), 3*a(n+1)> like <6,3,9>, <10,5,15>, <14,7,21> appear in the EKG sequence A064413, see Theorem (3) there. - Paul Curtz, Feb 13 2011.
Complement of A065090; abs(A151763(a(n))) = 1. - Reinhard Zumkeller, Oct 06 2011
Right edge of the triangle in A065305. - Reinhard Zumkeller, Jan 30 2012
Numbers with two odd divisors. - Omar E. Pol, Mar 24 2012
Odd prime p divides some (2^k + 1) or (2^k - 1), (k>0, minimal, cf. A003558) depending on the parity of A179480((p+1)/2) = r. This is a consequence of the Quasi-order theorem and corollaries, [Hilton and Pederson, pp. 260-264]: 2^k == (-1)^r mod b, b odd; and b divides 2^k - (-1)^r, where p is a subset of b. - Gary W. Adamson, Aug 26 2012
Subset of the arithmetic numbers (A003601). - Wesley Ivan Hurt, Sep 27 2013
Odd primes p satisfy the identity: p = (product(2*cos((2*k+1)*Pi/(2*p)), k=0..(p-3)/2))^2. This follows from C(2*p, 0) = (-1)^((p-1)/2)*p, n>=2, with the minimal polynomial C(k,x) of rho(k) := 2*cos(Pi/k). See A187360 for C and the W. Lang link on the field Q(rho(n)), eqs. (20) and (37). - Wolfdieter Lang, Oct 23 2013
Numbers m > 1 such that m^2 divides (2m-1)!! + m. - Thomas Ordowski, Nov 28 2014
Numbers m such that m divides 2*(m-3)! + 1. - Thomas Ordowski, Jun 20 2015
Numbers m such that (2m-3)!! == m (mod m^2). - Thomas Ordowski, Jul 24 2016
Odd numbers m such that ((m-3)!!)^2 == +-1 (mod m). - Thomas Ordowski, Jul 27 2016
Primes of the form x^2 - y^2. - Thomas Ordowski, Feb 27 2017
Conjecture: a(n) is the smallest odd number m > prime(n) such that Sum_{k=1..prime(n)-1} k^(m-1) == prime(n)-1 (mod m). This is an extension of the Agoh-Giuga conjecture. - Thomas Ordowski, Aug 01 2018
Numbers k > 1 such that either Phi(k,x) == 1 (mod k) or Phi(k,x) == k (mod k^2) holds, where Phi(k,x) is the k-th cyclotomic polynomial. - Jianing Song, Aug 02 2018

References

  • Paulo Ribenboim, The little book of big primes, Springer 1991, p. 106.

Crossrefs

Cf. A000040, A033270, union of A002144 and A002145.
Cf. A230953 (boustrophedon transform).

Programs

  • Haskell
    a065091 n = a065091_list !! (n-1)
    a065091_list = tail a000040_list  -- Reinhard Zumkeller, Jan 30 2012
    
  • Magma
    [NthPrime(n): n in [2..100]]; // Vincenzo Librandi, Jun 21 2015
    
  • Maple
    A065091 := proc(n) RETURN(ithprime(n+1)) end:
  • Mathematica
    Prime[Range[2, 33]] (* Vladimir Joseph Stephan Orlovsky, Aug 22 2008 *)
  • PARI
    forprime(p=3, 200, print1(p, ", ")) \\ Felix Fröhlich, Jun 30 2014
    
  • Python
    from sympy import prime
    def A065091(n): return prime(n+1) # Chai Wah Wu, Jul 13 2024
  • Sage
    def A065091_list(limit):  # after Minác's formula
        f = 3; P = [f]
        for n in range(3, limit, 2):
            if (f+1)>n*(f//n)+1: P.append(n)
            f = f*n
        return P
    A065091_list(100)  # Peter Luschny, Oct 17 2013
    

Formula

a(n) = A000040(n+1). - M. F. Hasler, Oct 26 2013

Extensions

More terms from Francisco Salinas (franciscodesalinas(AT)hotmail.com), Jan 05 2002
Edited (moved contributions from A000040 to here) by M. F. Hasler, Oct 26 2013

A368110 Numbers of which it is possible to choose a different divisor of each prime index.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 25, 26, 29, 30, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 45, 46, 47, 49, 51, 53, 55, 57, 58, 59, 61, 62, 63, 65, 66, 67, 69, 70, 71, 73, 74, 75, 77, 78, 79, 82, 83, 85, 86, 87, 89, 91, 93, 94, 95, 97
Offset: 1

Views

Author

Gus Wiseman, Dec 15 2023

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
By Hall's marriage theorem, k is a term if and only if there is no sub-multiset S of the prime indices of k such that fewer than |S| numbers are divisors of a member of S. Equivalently, there is no divisor of k in A370348. - Robert Israel, Feb 15 2024

Examples

			The terms together with their prime indices begin:
   1: {}
   2: {1}
   3: {2}
   5: {3}
   6: {1,2}
   7: {4}
   9: {2,2}
  10: {1,3}
  11: {5}
  13: {6}
  14: {1,4}
  15: {2,3}
  17: {7}
  19: {8}
  21: {2,4}
  22: {1,5}
  23: {9}
  25: {3,3}
  26: {1,6}
  29: {10}
  30: {1,2,3}
		

Crossrefs

Partitions of this type are counted by A239312, complement A370320.
Positions of nonzero terms in A355739.
Complement of A355740.
For just prime divisors we have A368100, complement A355529 (odd A355535).
A000005 counts divisors.
A003963 multiplies together the prime indices of n.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
A120383 lists numbers divisible by all of their prime indices.
A324850 lists numbers divisible by the product of their prime indices.
A355731 counts choices of a divisor of each prime index, firsts A355732.
A355741 chooses prime factors of prime indices, variations A355744, A355745.

Programs

  • Maple
    filter:= proc(n) uses numtheory, GraphTheory; local B,S,F,D,E,G,t,d;
      F:= ifactors(n)[2];
      F:= map(t -> [pi(t[1]),t[2]], F);
      D:= `union`(seq(divisors(t[1]), t = F));
      F:= map(proc(t) local i;seq([t[1],i],i=1..t[2]) end proc,F);
      if nops(D) < nops(F) then return false fi;
      E:= {seq(seq({t,d},d=divisors(t[1])),t = F)};
      S:= map(t -> convert(t,name), [op(F),op(D)]);
      E:= map(e -> map(convert,e,name),E);
      G:= Graph(S,E);
      B:= BipartiteMatching(G);
      B[1] = nops(F);
    end proc:
    select(filter, [$1..100]); # Robert Israel, Feb 15 2024
  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],Select[Tuples[Divisors/@prix[#]],UnsameQ@@#&]!={}&]

Formula

Heinz numbers of the partitions counted by A239312.

A174090 Powers of 2 and odd primes; alternatively, numbers that cannot be written as a sum of at least three consecutive positive integers.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 11, 13, 16, 17, 19, 23, 29, 31, 32, 37, 41, 43, 47, 53, 59, 61, 64, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 256
Offset: 1

Views

Author

Vladimir Joseph Stephan Orlovsky, Mar 07 2010, and Omar E. Pol, Feb 24 2014

Keywords

Comments

From Omar E. Pol, Feb 24 2014: (Start)
Also the odd noncomposite numbers (A006005) and the powers of 2 with positive exponent, in increasing order.
If a(n) is composite and a(n) - a(n-1) = 1 then a(n-1) is a Mersenne prime (A000668), hence a(n-1)*a(n)/2 is a perfect number (A000396) and a(n-1)*a(n) equals the sum of divisors of a(n-1)*a(n)/2.
If a(n) is even and a(n+1) - a(n) = 1 then a(n+1) is a Fermat prime (A019434). (End)

Crossrefs

Numbers not in A111774.
Equals A000079 UNION A065091.
Equals A067133 \ {6}.

Programs

  • Maple
    N:= 300: # to get all terms <= N
    S:= {seq(2^i,i=0..ilog2(N))} union select(isprime,{ 2*i+1 $ i=1..floor((N-1)/2) }):
    sort(convert(S,list)); # Robert Israel, Jun 18 2015
  • Mathematica
    a[n_] := Product[GCD[2 i - 1, n], {i, 1, (n - 1)/2}] - 1;
    Select[Range[242], a[#] == 0 &] (* Gerry Martens, Jun 15 2015 *)
  • PARI
    list(lim)=Set(concat(concat(1,primes(lim)), vector(logint(lim\2,2),i,2^(i+1)))) \\ Charles R Greathouse IV, Sep 19 2024
    
  • PARI
    select( {is_A174090(n)=isprime(n)||n==1<M. F. Hasler, Oct 24 2024
  • Python
    from sympy import primepi
    def A174090(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+x+(0 if x<=1 else 1-primepi(x))-x.bit_length())
        return bisection(f,n,n) # Chai Wah Wu, Sep 19 2024
    

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Sep 19 2024

Extensions

This entry is the result of merging an old incorrect entry and a more recent correct version. N. J. A. Sloane, Dec 07 2015

A109814 a(n) is the largest k such that n can be written as sum of k consecutive positive integers.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 2, 1, 3, 4, 2, 3, 2, 4, 5, 1, 2, 4, 2, 5, 6, 4, 2, 3, 5, 4, 6, 7, 2, 5, 2, 1, 6, 4, 7, 8, 2, 4, 6, 5, 2, 7, 2, 8, 9, 4, 2, 3, 7, 5, 6, 8, 2, 9, 10, 7, 6, 4, 2, 8, 2, 4, 9, 1, 10, 11, 2, 8, 6, 7, 2, 9, 2, 4, 10, 8, 11, 12, 2, 5, 9, 4, 2, 8, 10, 4, 6, 11, 2, 12, 13, 8, 6, 4, 10, 3, 2, 7, 11, 8, 2, 12
Offset: 1

Views

Author

Keywords

Comments

n is the sum of at most a(n) consecutive positive integers. As suggested by David W. Wilson, Aug 15 2005: Suppose n is to be written as sum of k consecutive integers starting with m, then 2n = k(2m + k - 1). Only one of the factors is odd. For each odd divisor d of n there is a unique corresponding k = min(d,2n/d). a(n) is the largest among those k. - Jaap Spies, Aug 16 2005
The numbers that can be written as a sum of k consecutive positive integers are those in column k of A141419 (as a triangle). - Peter Munn, Mar 01 2019
The numbers that cannot be written as a sum of two or more consecutive positive integers are the powers of 2. So a(n) = 1 iff n = 2^k for k >= 0. - Bernard Schott, Mar 03 2019

Examples

			Examples provided by _Rainer Rosenthal_, Apr 01 2008:
1 = 1     ---> a(1) = 1
2 = 2     ---> a(2) = 1
3 = 1+2   ---> a(3) = 2
4 = 4     ---> a(4) = 1
5 = 2+3   ---> a(5) = 2
6 = 1+2+3 ---> a(6) = 3
a(15) = 5: 15 = 15 (k=1), 15 = 7+8 (k=2), 15 = 4+5+6 (k=3) and 15 = 1+2+3+4+5 (k=5). - _Jaap Spies_, Aug 16 2005
		

Crossrefs

Cf. A000079 (powers of 2), A000217 (triangular numbers).

Programs

  • Maple
    A109814:= proc(n) local m, k, d; m := 0; for d from 1 by 2 to n do if n mod d = 0 then k := min(d, 2*n/d): fi; if k > m then m := k fi: od; return(m); end proc; seq(A109814(i),i=1..150); # Jaap Spies, Aug 16 2005
  • Mathematica
    a[n_] := Reap[Do[If[OddQ[d], Sow[Min[d, 2n/d]]], {d, Divisors[n]}]][[2, 1]] // Max; Table[a[n], {n, 1, 102}]
  • Python
    from sympy import divisors
    def a(n): return max(min(d, 2*n//d) for d in divisors(n) if d&1)
    print([a(n) for n in range(1, 103)]) # Michael S. Branicky, Dec 23 2022
  • Sage
    [sloane.A109814(n) for n in range(1,20)]
    # Jaap Spies, Aug 16 2005
    

Formula

From Reinhard Zumkeller, Apr 18 2006: (Start)
a(n)*(a(n)+2*A118235(n)-1)/2 = n;
a(A000079(n)) = 1;
a(A000217(n)) = n. (End)

Extensions

Edited by N. J. A. Sloane, Aug 23 2008 at the suggestion of R. J. Mathar

A174069 Numbers that can be written as a sum of at least 2 squares of consecutive positive integers.

Original entry on oeis.org

5, 13, 14, 25, 29, 30, 41, 50, 54, 55, 61, 77, 85, 86, 90, 91, 110, 113, 126, 135, 139, 140, 145, 149, 174, 181, 190, 194, 199, 203, 204, 221, 230, 245, 255, 265, 271, 280, 284, 285, 294, 302, 313, 330, 355, 365, 366, 371, 380, 384, 385, 415, 421, 434, 446, 451
Offset: 1

Views

Author

Keywords

Comments

Numbers are listed without multiplicity: 365 is the first term that is the sum of two or more squares in more than one way. See A062681 for other numbers of that form. - M. F. Hasler, Dec 22 2013
A subsequence of A212016. This sequence focuses on the squares of consecutive positive integers. - Altug Alkan, Dec 24 2015

Examples

			5 = 1^2 + 2^2
13 = 2^2 + 3^2
14 = 1^2 + 2^2 + 3^2
25 = 3^2 + 4^2
		

Crossrefs

Cf. A111774, A138591, A151557 (subset of squares), A163251 (subset of primes).
See also A062681, A212016.

Programs

  • Mathematica
    max = 50^2; lst = {}; Do[z = n^2; Do[z += (n + x)^2; If[z > max, Break[]]; AppendTo[lst, z], {x, max/2}], {n, max/2}]; Union[lst]
  • PARI
    N=20;a=[];for(i=2,N, for(k=1,i-1,if(N^2*2>t=sum(j=i-k,i,j^2),a=setunion(a,Set(t)),break)));a \\ M. F. Hasler, Dec 22 2013

Extensions

Name edited by Altug Alkan, Dec 24 2015

A174070 Numbers that can be written as a sum of at least 3 consecutive squares.

Original entry on oeis.org

14, 29, 30, 50, 54, 55, 77, 86, 90, 91, 110, 126, 135, 139, 140, 149, 174, 190, 194, 199, 203, 204, 230, 245, 255, 271, 280, 284, 285, 294, 302, 330, 355, 365, 366, 371, 380, 384, 385, 415, 434, 446, 451, 476, 492, 501, 505, 506, 509, 510, 534, 559, 590, 595
Offset: 1

Views

Author

Keywords

Comments

Numbers of the form (a(a+1)(2a+1)-b(b+1)(2b+1))/6 where a >= b+3 and b >= 0. - Robert Israel, Jul 18 2017

Examples

			14 = 1^2 + 2^2 + 3^2, 29 = 2^2 + 3^2 + 4^2.
30 = 1^2 + 2^2 + 3^2 + 4^2, 50 = 3^2 + 4^2 + 5^2.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    R:= [seq(b*(b+1)*(2*b+1)/6, b=0..ceil(sqrt(N/3)))]:
    sort(convert(select(`<=`, {seq(seq(R[i]-R[j],j=1..i-3),i=1..nops(R))},N),list)); # Robert Israel, Jul 18 2017
  • Mathematica
    max=50^2;lst={};Do[z=n^2+(n+1)^2;Do[z+=(n+x)^2;If[z>max,Break[]];AppendTo[lst,z],{x,2,max/2}],{n,max/2}];Union[lst]
    (* Second program: *)
    Function[s, Function[t, Union@ Flatten@ Map[TakeWhile[#, # < t[[1, -1]] &] &, t]]@ Map[Total /@ Partition[s, #, 1] &, Range[3, Length@ s]]][Range[16]^2] (* Michael De Vlieger, Jul 18 2017 *)
    Module[{nn=30,sq},sq=Range[nn]^2;Take[Union[Flatten[Table[Total/@ Partition[ sq,n,1],{n,3,nn-2}]]],2nn]] (* Harvey P. Dale, Nov 16 2017 *)

A111775 Number of ways n can be written as a sum of at least three consecutive integers.

Original entry on oeis.org

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

Views

Author

Jaap Spies, Aug 16 2005

Keywords

Comments

Powers of 2 and (odd) primes cannot be written as a sum of at least three consecutive integers. a(n) strongly depends on the number of odd divisors of n (A001227): Suppose n is to be written as sum of k consecutive integers starting with m, then 2n = k(2m + k - 1). Only one of the factors is odd. For each odd divisor of n there is a unique corresponding k, k=1 and k=2 must be excluded.
When the initial 0 term is a(1), a(n) is the number of times n occurs after the second column in the square array of A049777. - Bob Selcoe, Feb 14 2014
For nonnegative integers x,y where x-y>=3: a(n) equals the number of ways n can be expressed as a function of (x*(x+1)-y*(y+1))/2 when the initial 0 term is a(1). - Bob Selcoe, Feb 14 2014

Examples

			a(15) = 2 because 15 = 4+5+6 and 15 = 1+2+3+4+5. The number of odd divisors of 15 is 4.
G.f. = x^6 + x^9 + x^10 + x^12 + x^14 + 2*x^15 + 2*x^18 + x^20 + 2*x^21 + x^22 + ...
a(30) = 3 because there are 3 ways to satisfy (x*(x+1)-y*(y+1))/2 = 30 when x-y>=3: x=8, y=3; x=9, y=5; and x=11, y=8. - _Bob Selcoe_, Feb 14 2014
		

References

  • Nieuw Archief voor Wiskunde 5/6 nr. 2 Problems/UWC Problem C part 4, Jun 2005, p. 181-182

Crossrefs

Cf. A111774, A001227 (number of odd divisors), A069283.

Programs

  • Maple
    A001227:= proc(n) local d, s; s := 0: for d from 1 by 2 to n do if n mod d = 0 then s:=s+1 fi: end do: return(s); end proc; A111775:= proc(n) local k; if n=1 then return(0) fi: k := A001227(n): if type(n,even) then k:=k-1 else k:=k-2 fi: return k; end proc; seq(A111775(i), i=1..150);
  • Mathematica
    a[n_] := If[n == 1, 0, Total[Mod[Divisors[n], 2]] - Mod[n, 2] - 1];
    a /@ Range[1, 100] (* Jean-François Alcover, Oct 14 2019 *)
  • PARI
    {a(n) = local(m); if( n<1, 0, sum( i=0, n, m=0; if( issquare( 1 + 8*(n + i * (i + 1)/2), &m), m\2 > i+2)))}; /* Michael Somos, Aug 27 2012 */

Formula

If n is even then a(n) = A001227(n)-1 = A069283(n) otherwise a(n) = A001227(n)-2, for n > 1.
G.f.: Sum_{n >= 2} x^(3*n)/(1 - x^(2*n)). - Peter Bala, Jan 12 2021

A174071 Numbers that can be written as a sum of at least 4 consecutive positive squares.

Original entry on oeis.org

30, 54, 55, 86, 90, 91, 126, 135, 139, 140, 174, 190, 199, 203, 204, 230, 255, 271, 280, 284, 285, 294, 330, 355, 366, 371, 380, 384, 385, 415, 446, 451, 476, 492, 501, 505, 506, 510, 534, 559, 595, 615, 620, 630, 636, 645, 649, 650, 679, 728, 730, 734, 764
Offset: 1

Views

Author

Keywords

Comments

Numbers of the form m*(6*k^2 + 6*k*m + 2*m^2 - 6*k - 3*m + 1)/6 for some m>=4 and k>=1. - Robert Israel, May 06 2019

Examples

			30=1^2+2^2+3^2+4^2, 54=2^2+3^2+4^2+5^2, 55=1^2+2^2+3^2+4^2+5^2, ...
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    Res:= NULL:
    for m from 4 while m*(m+1)*(2*m+1)/6 <= N do
       for k from 1 do
           v:= m*(6*k^2 + 6*k*m + 2*m^2 - 6*k - 3*m + 1)/6;
           if v > N then break fi;
           Res:= Res, v;
    od od:
    sort(convert({Res},list));  Robert Israel, May 06 2019
  • Mathematica
    max=60^2;lst={};Do[z=n^2+(n+1)^2+(n+2)^2;Do[z+=(n+x)^2;If[z>max,Break[]];AppendTo[lst,z],{x,3,Sqrt[max]/2}],{n,Sqrt[max]/2}];Union[lst]

Extensions

Edited by Robert Israel, May 06 2019

A219839 a(n) is the number of odd integers in 2..(n-1) that have a common factor (other than 1) with n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 2, 0, 1, 3, 0, 0, 3, 0, 2, 4, 1, 0, 4, 2, 1, 4, 2, 0, 7, 0, 0, 6, 1, 5, 6, 0, 1, 7, 4, 0, 9, 0, 2, 10, 1, 0, 8, 3, 5, 9, 2, 0, 9, 7, 4, 10, 1, 0, 14, 0, 1, 13, 0, 8, 13, 0, 2, 12, 11, 0, 12, 0, 1, 17, 2, 8, 15, 0, 8, 13, 1, 0, 18
Offset: 1

Views

Author

Lei Zhou, Nov 29 2012

Keywords

Comments

a(n) is also the number of linearly dependent diagonal/side length ratios R(n,k), in the regular n-gon. The following will explain this. In the regular n-gon inscribed in a circle the number of distinct diagonals including the side is floor(n/2). Not all of the corresponding length ratios R(n,k) = d(n,k)/d(n,1), k = 1..floor(n/2), with d(n,1) = s(n) (the length of the side), d(n,2) the length of the smallest diagonal, etc., are linearly independent because C(n,R(n,2)) = 0, where C is the minimal polynomial of R(n,2) = 2*cos(Pi/n) (see A187360) with degree delta(n) = A055034(n). Thus every ratio R(n,j), with j = delta(n)+1, ..., floor(n/2) can be expressed as a linear combination of the independent R(n,k), k=1, ..., delta(n). See the comment from Sep 21 2013 on A053121 for powers of R(n,2) (called there rho(N)). Therefore, a(n) = floor(n/2) - delta(n) is, for n>=2, the number of linearly dependent ratios R(n,k) in the regular n-gon. - Wolfdieter Lang, Sep 23 2013
From Wolfdieter Lang, Nov 23 2020: (Start)
This sequence gives the difference between the number of odd numbers in the smallest nonnegative residue system modulo n (called here RS(n)) and the smallest nonnegative restricted residue system (called here RRS(n), but RRS(1) = {1}, not {0}).
This sequence can be used to find sequence A111774 by recording the positions of the entries >= 1. See a W. Lang comment there, and also A337940, for the proof. Hence the complement of A111774, given in A174090, is given by the numbers m with a(m) = 0. (End)

Examples

			n=1: there is no odd number greater than 2 but smaller than 1-1=0, so a(1)=0.
Same for n=2,3.
n=4: 3 is the only odd number in 2..(4-1), and GCD(3,4)=1, so a(4)=0.
For any prime numbers and numbers in the form of 2^n, no odd number in 2..(n-1) has common factor with n, so a(p)=0 and a(2^n)=0, n>0.
n=6: 3,5 are odd numbers in 2..(6-1), and GCD(3,6)=3>1 and GCD(5,6)=1, so a(6)=1.
n=15: candidates are 3,5,7,9,11,13.  3, 5, and 9 have greater than 1 common factors with 15, so a(15)=3
From _Wolfdieter Lang_, Sep 23 2013: (Start)
Example n = 15 for a(n) = floor(n/2) - delta(n): 1, 3, 5, 7, 9, 11, 13 take out 1, 7, 9, 11, leaving 3, 5, 13. Therefore, a(15) = 7 - 4 = 3. See the formula above for delta.
In the regular 15-gon the 3 (= a(15)) diagonal/side ratios R(15, 5), R(15, 6) and R(15,7) can be expressed as linear combinations of the R(15,j), j=1..4.  See the n-gon comment above. (End)
From _Wolfdieter Lang_, Nov 23 2020: (Start)
n = 1: RS(1) = {0}, RRS(1) = {1}, hence a(1) = 0 - 1 = 0. Here RRS(1) is not {0}(standard) because delta(1) := 1 (the degree of minimal polynomial for 2*cos(Pi//1) = -2 which is x+2, see A187360).
n = 6: RS(6) = {0, 1, 2, 3, 4, 5} and RRS(6) = {1,5}, hence a(6) = 3 - 2 = 1, and A111774(1) = 6 = A337940(1, 1).
a(15) = 7 - 4 = 3, and A111774(6) = 15 = A337940(3, 3) = A337940(4, 1) (multiplicity 2 = A338428(6)). (End)
		

Crossrefs

Cf. A000010, A016035 (see 1st comment there), A004526, A055034, A111774, A174090, A190357, A337940, A338428.

Programs

Formula

a(n) = floor(n/2) - delta(n), with floor(n/2) = A004526 and delta(n) = A055034(n) = phi(2*n)/2, for n >= 2, with Euler's phi A000010. See the Aug 17 2011 comment on A055034. For n = 1 this would be -1, not 0, because delta(1) = 1. - Wolfdieter Lang, Sep 23 2013
Sum_{k=1..n} a(k) ~ c*n^2, where c = 1/4 - 2/Pi^2 = 0.04735763... (A190357). - Amiram Eldar, Feb 23 2025
Showing 1-10 of 17 results. Next