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.

Previous Showing 11-17 of 17 results.

A337940 Triangle read by rows: T(n, k) = T(n+2) - T(n-k), with the triangular numbers T = A000217, for n >= 1, k = 1, 2, ..., n.

Original entry on oeis.org

6, 9, 10, 12, 14, 15, 15, 18, 20, 21, 18, 22, 25, 27, 28, 21, 26, 30, 33, 35, 36, 24, 30, 35, 39, 42, 44, 45, 27, 34, 40, 45, 49, 52, 54, 55, 30, 38, 45, 51, 56, 60, 63, 65, 66, 33, 42, 50, 57, 63, 68, 72, 75, 77, 78, 36, 46, 55, 63, 70, 76, 81, 85, 88, 90, 91
Offset: 1

Views

Author

Wolfdieter Lang, Nov 23 2020

Keywords

Comments

This number triangle results from the array A(n, m) = T(n+m+1) - T(n-1), with T = A000217, for n, m >= 1. For this array see the example by Bob Selcoe, in A111774 (but with rows continued). The present triangle is obtained by reading the array by upwards antidiagonals: T(n, k) = A(n+1-k, k). See also the Jul 09 2019 comment by Ralf Steiner with the formula c_k(n) (rows k >= 1, columns n >= 3), rewritten for A(n, m) = (m+2)*(2*n+m+1)/2, leading to T(n, k) = (k+2)*(2*n-k+3)/2.
Therefore this triangle is related to the problem of giving the numbers which are sums of at least three consecutive positive integers given as sequence A111774. It allows us to find the multiplicities for the numbers of A111774. They are given in A338428(n).
To obtain the multiplicity for number N (>= 6) from A111774 one has to consider only the triangle rows n = 1, 2, ..., floor((N-3)/3).
The row reversed triangle, considered by Bob Selcoe in A111774, is T(n, n-k+1) = T(n+2) - T(k-1), for n >= 1, and k=1, 2, ..., n.
This triangle contains no odd prime numbers and no exact powers 2^m, for m >= 0. This can be seen by considering the diagonal sequences D(d, k), for d >= 1, k >= 1 or the row sequences of the array A(n, m), for n >= 1 and m >= 1. The result is A(r+1, s-2) = s*(s + 2*r + 1)/2, for r >= 0 and s >= 3 (from the g.f. of the diagonals of T given below). This is also given in the Jul 09 2019 comment by Ralf Steiner in A111774. Therefore A(r+1, s-2) is a product of two numbers >= 2, hence not a prime. And in both cases (i) s/2 integer or (ii) (s + 2*r + 1)/2 integer not both numbers can be powers of 2 by simple parity arguments.
The previous comment means that each T(n, k) has at least one odd prime as a proper divisor.
A number N appears in this triangle, or in A111774, if and only if floor(N/2) - delta(N) >= 1, where delta(N) = A055034(N). For the sequence b(n) := floor(n/2) - delta(n), for n >= 2, see A219839(n), b(1) = -1. See a W. Lang comment in A111774 for the proof.

Examples

			The triangle T(n, k) begins:
n \ k  1  2  3  4  5   6   7   8   9  10  11  12  13  14  15 ...
1:     6
2:     9 10
3:    12 14 15
4:    15 18 20 21
5:    18 22 25 27 28
6:    21 26 30 33 35  36
7:    24 30 35 39 42  44  45
8:    27 34 40 45 49  52  54  55
9:    30 38 45 51 56  60  63  65  66
10:   33 42 50 57 63  68  72  75  77  78
11:   36 46 55 63 70  76  81  85  88  90  91
12:   39 50 60 69 77  84  90  95  99 102 104 105
13:   42 54 65 75 84  92  99 105 110 114 117 119 120
14:   45 58 70 81 91 100 108 115 121 126 130 133 135 136
15:   48 62 75 87 98 108 117 125 132 138 143 147 150 152 153
...
N = 15 appears precisely twice from the sums 4+5+6 = A(4, 1) = T(4, 1), and (1+2+3)+4+5 = A(1, 3) = T(3, 3), i.e., with a sum of 3 and 5 consecutive positive integers.
N = 42 appears three times from the sums 13+14+15 = A(13, 1) = T(13, 1), 9+10+11 +12 = A(9, 2) = T(10, 2), 3+4+5+6+7+8+9 = A(3, 5) = T(7, 5); i.e., 42 can be written as a sum of 3, 4 and 7 consecutive positive integers.
		

Crossrefs

Cf. A055034, A111774, A338428 (multiplicities), A219839.
For columns k = 1, 2, ..., 10 see A008585, A016825, A008587, A016945, A008589, A017113, A008591, A017329, A008593, A017593.
For diagonals d = 1, 2, ..., 10 see A000217, A000096, A055998, A055999, A056000, A056115, A056119 , A056121, A056126, A051942.

Programs

  • Mathematica
    Flatten[Table[((n+2)*(n+3)-(n-k)*(n-k+1))/2,{n,11},{k,n}]] (* Stefano Spezia, Nov 24 2020 *)

Formula

T(n, k) = ((n+2)*(n+3) - (n-k)*(n-k+1))/2, for n >= 1 and k = 1, 2, ..., n (see the name).
T(n, k) = (k+2)*(2*n-k+3)/2 (factorized).
G.f. columns k = 2*j+1, for j >= 0: Go(j, x) = x^(2*j+1)*(2*j+3)*(j+2 - (j+1)*x)/(1-x)^2,
G.f. columns k = 2*j, for j >= 1: Ge(j, x) = x^(2*j)*(j+1)*(2*j+3 - (2*j+1)*x)/(1-x)^2.
G.f. row polynomials: G(z,x) = z*x*(1 + z*x)^3*{3*(2-z) - (8-3*z)*(z*x) + (3-z)*(z*x)^2}/((1 - z)^2*(1 - (z*x)^2)^3).
G.f. diagonals d >= 1: GD(d, x) = ((d+1)*3 - (5*d+3)*x + (2*d+1)*x^2)/(1-x)^3.
G.f. of GD(d, x): GGD(z,x) = (6-8*x+3*x^2 - (3-3*x+x^2)*z)/((1-x)^3*(1-z)^2).

A066542 Nonnegative integers all of whose anti-divisors are either 2 or odd.

Original entry on oeis.org

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
Offset: 1

Views

Author

John W. Layman, Jan 07 2002

Keywords

Comments

See A066272 for definition of anti-divisor.
The following conjectures have been proved by Bob Selcoe. - Michael Somos, Feb 28 2014
Additional conjectures suggested by computational experiments:
1) Numbers all of whose anti-divisors (AD's) are odd => {2^k} (A000079).
2) Numbers with AD 2, all other AD's odd => primes (A000040).
3) Numbers none of whose AD's are multiples of 3 => 3*2^k (A007283).
4) Numbers all of whose AD's are even => 3*A002822 = A040040 (except for a(0)=1), both related to twin prime pairs.
Calculations suggest the following conjecture. This sequence consists of all odd primes and nonnegative powers of 2 and no other terms. This has been verified for to n=100000. Robert G. Wilson v extended the conjecture out to 2^20.
From Bob Selcoe, Feb 24 2014: (Start)
The sequence consists of all odd primes and powers of two (>=2^2) and no other terms.
Proof: Denote the even anti-divisors of n as ADe(n). ADe(n) is defined as the set of numbers x satisfying the equation n(mod x)=x/2. Substitute x = 2n/y, since it can be shown that ADe(n) => 2n divided by the odd divisors of n when n>1 (This is because 2j anti-divides only numbers of the form 3j+2j*k; j>=1, k>=0. For example: j=7; 14 anti-divides only 21,35,49,63.... So in other words, even numbers anti-divide only odd multiples (>=3) of themselves, divided by 2). Therefore, ADe(n) is n(mod [2n/y])=n/y, and y must be an odd divisor of n and 2n, y>1. Since y is the only odd divisor of n when y>1 iff n is prime, then ADe(n) => 2 when n is prime. Since 2n has no odd divisors when n=2^k, then ADe(n) is null when n=2^k. Therefore, the only numbers whose anti-divisors are either 2 or odd must be primes and powers of 2.
Similarly, for odd anti-divisors (ADo(n)): Given 2j+1 (odd numbers) anti-divide only numbers of the forms [(3j+1)+(2j+1)*k] and [(3j+2)+(2j+1)*k]; j>=1, k>=0. (For example: j=6; 13 anti-divides only 19,20, 32,33, 45,46...). Since odd n divided by its odd divisors ARE its odd divisors, then ADo(n) => the divisors of 2n-1 and 2n+1 (except 1, 2n-1 and 2n+1).
By extension:
1) Numbers all of whose anti-divisors (AD's) are odd => {2^k} (A000079).
2) Numbers with ADe(n)=2, all other AD's odd => primes (A000040).
3) Numbers none of whose AD's are multiples of j => j*2^k.
4) When 2n-1 and 2n+1 are twin primes, (A040040, except for a(0)=1) then n has only even AD's.
(End)
If 1 and 2 are included, this sequence contains all positive integers not contained in A111774. - Bob Selcoe, Sep 09 2014 [corrected by Wolfdieter Lang, Nov 06 2020]

Examples

			From _Bob Selcoe_, Feb 24 2014: (Start)
ADe(420): Odd divisors of 420 are: 3,5,7,15,21,35, 105. ADe(420) => 840/{3,5,7,15,21,35,105} = 8,24,40,56,120,168 and 280.
ADo(420) => the divisors of 839 and 841, which are (a) for 839: null (839 is prime); and (b) for 841: 29 (841 is 29^2).
All AD's (AD(420)) => 8,24,29,40,56,120,168 and 280 (End)
		

Crossrefs

Programs

  • Mathematica
    antid[n_] := Select[ Union[ Join[ Select[ Divisors[2n - 1], OddQ[ # ] && # != 1 &], Select[ Divisors[2n + 1], OddQ[ # ] && # != 1 &], 2n / Select[ Divisors[2*n], OddQ[ # ] && # != 1 &]]], # < n & ]; f[n_] := Select[ antid[n], EvenQ[ # ] && # > 2 & ]; Select[ Range[3, 300], f[ # ] == {} & ]

A111787 a(n) is the least k >= 3 such that n can be written as sum of k consecutive integers. a(n)=0 if such a k does not exist.

Original entry on oeis.org

0, 0, 0, 0, 0, 3, 0, 0, 3, 4, 0, 3, 0, 4, 3, 0, 0, 3, 0, 5, 3, 4, 0, 3, 5, 4, 3, 7, 0, 3, 0, 0, 3, 4, 5, 3, 0, 4, 3, 5, 0, 3, 0, 8, 3, 4, 0, 3, 7, 5, 3, 8, 0, 3, 5, 7, 3, 4, 0, 3, 0, 4, 3, 0, 5, 3, 0, 8, 3, 5, 0, 3, 0, 4, 3, 8, 7, 3, 0, 5, 3, 4, 0, 3, 5, 4, 3, 11, 0, 3, 7, 8, 3, 4, 5, 3, 0, 7, 3, 5, 0, 3, 0, 13
Offset: 1

Views

Author

Jaap Spies, Aug 16 2005

Keywords

Comments

a(n)=0 if n is an odd prime or a power of 2. For numbers of the third kind we proceed as follows: suppose n is to be written as sum of k consecutive integers starting with m, then 2n = k(2m + k - 1). Let p be the smallest odd prime divisor of n then a(n) = min(p,2n/p).

Examples

			a(15)=3 because 15=4+5+6 (k=3) and 15=2+3+4+5 (k=4)
		

References

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

Crossrefs

Programs

  • Maple
    ispoweroftwo := proc(n) local a, t; t := 1; while (n > t) do t := 2*t end do; if (n = t) then a := true else a:= false end if; return a;end proc; A111787:= proc(n) local d, k; k:=0; if isprime(n) or ispoweroftwo(n) then return(0); fi; for d from 3 by 2 to n do if n mod d = 0 then k:=min(d,2*n/d); break; fi; od; return(k); end proc; seq(A111787(i),i=1..150);

A202238 Characteristic function of positive integers not prime and not a power of 2.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1
Offset: 1

Views

Author

Michael Somos, Dec 16 2011

Keywords

Crossrefs

Programs

  • PARI
    {a(n) = n>0 && !isprime(n) && n != 2^valuation(n, 2)}
    
  • Python
    from sympy import isprime
    def A202238(n): return int(not isprime(n) and bool((n&-n)^n)) # Chai Wah Wu, Mar 11 2025

Formula

A111775(n) = 0 if and only if a(n) = 0.
A111787(n) = 0 if and only if a(n) = 0.
a(n) = 1 for n in A111774. - Michel Marcus, Aug 28 2017

A270306 Smallest number which is representable as a sum of n but no fewer consecutive nonnegative integers, or 0 for n > 1 if no such number exists.

Original entry on oeis.org

0, 1, 6, 10, 20, 0, 28, 44, 0, 0, 88, 0, 104, 0, 0, 136, 272, 0, 304, 0, 0, 0, 368, 0, 0, 0, 0, 0, 464, 0, 496, 592, 0, 0, 0, 0, 1184, 0, 0, 0, 1312, 0, 1376, 0, 0, 0, 1504, 0, 0, 0, 0, 0, 1696, 0, 0, 0, 0, 0, 1888, 0, 1952, 0, 0, 2144, 0, 0, 4288, 0, 0, 0, 4544
Offset: 1

Views

Author

Martin Renner, Mar 14 2016

Keywords

Examples

			a(2) = 1 = 0 + 1 (two but no fewer terms)
a(3) = 6 = 1 + 2 + 3 (three but no fewer terms)
a(4) = 10 = 1 + 2 + 3 + 4 (four but no fewer terms)
a(5) = 20 = 2 + 3 + 4 + 5 + 6 (five but no fewer terms)
a(6) = 0, since no number needs six but no fewer terms
a(7) = 28 = 1 + 2 + 3 + 4 + 5 + 6 + 7 (seven but no fewer terms)
		

Crossrefs

Formula

a(A111774(n)) = 0.
a(A174090(n)) = A163172(n).

A337939 Irregular triangle T(n, m) read by rows: row n gives the distinct length ratios diagonal/side of regular n-gons, DSR(n, k), for n >= 2, k = 1, 2, ..., floor(n/2), expressed by the coefficients in the power basis of the Galois group Gal(Q(rho(n))/Q), where rho(n) = 2*cos(Pi/n), for n >= 2. T(1, 1) is set to 1.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Jan 15 2021

Keywords

Comments

The length of row n is given in A338431(n), for n >= 1.
The length of the sublists t(n, k) of the power basis coefficients of DSR(n, k), for k = 1, 2, ..., floor(n/2), is 1 if n = 1, for n >= 2 it is k except for n = n(j) = A111774(j) for which the final A219839(n) sublists have fewer than k members.
Trailing vanishing coefficients of the delta(n) = A055034(n) power base elements <1 = rho(n)^0, rho(n)^1, ..., rho(n)^{delta(n)-1}> are not recorded. The coefficients of the minimal polynomial C(n, x) of rho(n) = 2*cos(Pi/n) of degree delta(n) are given in A187360. C(n, rho(n)) = 0 is used to eliminate all powers of rho with exponent >= delta(n).
The length ratios DSR(n, k) := diagonal(n, k)/side(n) of regular n-gons, for n >= 2, and k = 1, 2, ..., floor(n/2) (distinct diagonals, starting with the side for k = 1, in increasing order) are given by DSR(n, k) = S(k-1, rho(n)), with the Chebyshev S polynomials (A049310). See the W. Lang link.
For n = 2, the degenerate case, diagonal/side = side/side = 1 for k = 1. For n = 1 (a point) diagonal/side is undetermined, and T(1, 1) is set to 1.
For the power basis sublists t(n, k), for k = 1, 2, ..., delta(n), only the k coefficients of S(k-1, x) are present (trailing vanishing coefficients are not recorded). For k = delta(n)+1, ..., floor(n/2) less than k coefficients appear due to elimination via C(n, rho(n)) = 0. E.g., for n = 6 with delta(6) = 2 the only coefficient for k = 3 is 2 (coefficient of rho^0). This appears for n = n(j) = A111774(j), because then floor(n/2) - delta(n) = A219839(n) > 0.
Because A219839(n) = 0 means that n is from A174090, i.e., a prime or a power of 2 (complement of A111774), these rows n have all the sublists t(n, k) with the k coefficients of S(k-1, x), hence they are identical (but the basis differs). See especially the table for the pairs of consecutive numbers n with identical coefficients, like (2, 3), (4, 5), (16, 17), (256, 267), (65536, 65537), ?... (cf. Fermat primes A019434).

Examples

			The irregular triangle T(n, m) begins: (For n >= 4 the bar divides the DSR(n, k) power basis coefficients, the sublists t(n, k), for k = 1, 2, ..., floor(n/2))
n \ m  1   2 3    4  5  6   7  8 9 10   11 12 12  13 14  15 16 17 18 19 20 ...
1:     1
2:     1
3:     1
4:     1 | 0 1
5:     1 | 0 1
6:     1 | 0 1 |  2
7:     1 | 0 1 | -1  0  1
8:     1 | 0 1 | -1  0  1 | 0 -2 0  1
9:     1 | 0 1 | -1  0  1 | 1  1
10:    1 | 0 1 | -1  0  1 | 0 -2 0  1 | -4  0  2
11:    1 | 0 1 | -1  0  1 | 0 -2 0  1 |  1  0 -3   0  1
12:    1 | 0 1 | -1  0  1 | 0 -2 0  1 |  0  0  1 | 0  2
13:    1 | 0 1 | -1  0  1 | 0 -2 0  1 |  1  0 -3   0  1 | 0  3  0 -4  0  1
...
n = 14: 1 | 0 1 | -1 0 1 | 0 -2 0 1 | 1 0 -3 0 1 | 0 3 0 -4 0 1 | 6 0 -8 0 2,
n = 15: 1 | 0 1 | -1 0 1 | 0 -2 0 1 | 0 4 1 -1 | 1 -2 0 1 | -1 1 1,
n = 16 and n = 17: 1 | 0 1 | -1  0 1 | 0 -2 0 1 | 1 0 -3 0 1 | 0 3 0 -4 0 1 | -1 0 6 0 -5 0 1 | 0 -4 0 10 0 -6 0 1,
--------------------------------------------------------------------------------
n = 5: DSR(5, 1) = 1 = side(5)/side(5), DSR(5, 2) = 1*rho(5) = A001622 (golden section).
n = 8: DSR(8, 1) = 1 = side(8)/side(8), DSR(8, 2) = 1*rho(8) = sqrt(2+sqrt(2)) = A179260, DSR(8, 3) = -1 + rho(8)^2 = 1 + sqrt(2) = A014176, DSR(8, 4) = -2*rho(8) + 1*rho(8)^3 = sqrt(2)*rho(8) = A121601.
		

Crossrefs

Formula

T(1, 1) = 1, and in row n, for n >= 2, the power base coefficients of Gal(Q(2*cos(Pi/n))/Q) for DSR(n, k) := diagonal(n, k)/side(n) of regular n-gons, for k = 1, 2, ..., floor(n/2), are listed as t(n, k) in this order, with trailing vanishing coefficients omitted.

A338431 Row length of irregular triangle A337939.

Original entry on oeis.org

1, 1, 1, 3, 3, 4, 6, 10, 8, 13, 15, 15, 21, 26, 21, 36, 36, 33, 45, 49, 42, 64, 66, 58, 72, 89, 71, 99, 105, 80, 120, 136, 105, 151, 137, 129, 171, 188, 147, 190, 210, 165, 231, 247, 184, 274, 276, 228, 288, 295
Offset: 1

Views

Author

Wolfdieter Lang, Jan 15 2021

Keywords

Examples

			n = 12: b(12) = 6 - 4 = 2 =  A219839(12) > 0, hence A000217(4) = 10,  R(4) = (1 + 2) + (1 + 1) = 5 from degree(S(4, x)/C(12,x) = 1*x^2) = 2 and degree(S(5, x)/C(12, x) = 2*x) = 1. Hence a(12) = 10 + 5 = 15.
		

Crossrefs

Formula

a(1) = 1, and for n >= 2, a(n) = Sum_{k=1..floor(n/2)} k = A000217(floor(n/2)) if b(n) := floor(n/2) - delta(n) = A219839(n) = 0, where delta(n) = A055034(n), and if b(n) > 0, i.e., n = n(j) = A111774(j), for j >= 1, then a(n) < A000217(floor(n/2)), determined by a(n) = A000217(delta(n)) + R(n), with R(n) = Sum_{k = delta(n)+1..floor(n/2)} (1 + degree(S(k-1, x) evaluated with C(n, x) = 0)), where the C polynomial coefficients are given in A187360.
Previous Showing 11-17 of 17 results.