A111774
Numbers that can be written as a sum of at least three consecutive positive integers.
Original entry on oeis.org
6, 9, 10, 12, 14, 15, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100, 102
Offset: 1
a(1)=6 because 6 is the first number that can be written as a sum of three consecutive positive integers: 6 = 1+2+3.
From _Bob Selcoe_, Feb 23 2014: (Start)
Let the top row of an array be A000217(n). Let the diagonals (reading down and left) be A000217(n)-A000217(1), A000217(n)-A000217(2), A000217(n)-A000217(3)..., A000217(n)-A000217(n-3). This is A049777 read as a square array, starting with the third column. The array begins as follows:
6 10 15 21 28 36 45 55 66
9 14 20 27 35 44 54 65
12 18 25 33 42 52 63
15 22 30 39 49 60
18 26 35 45 56
21 30 40 51
24 34 45
27 38
30
This is (x*(x+1)-y*(y+1))/2 for nonnegative integers x,y with x-y >= 3, because it is equivalent to 1+2+3/+4/+5/...+x/-0/-1/-2/-3/-4/-5/...-(x+3)/ for all possible strings of consecutive integers, which represents every possible way to sum three or more consecutive positive integers. So for example, 4+5+6+7 = 1+2+3+4+5+6+7-1-2-3 = 22, which is (x*(x+1)-y*(y+1))/2 when x=7, y=3. Notice that values can appear more than once in the array because some numbers can be represented as sums of more than one string of three or more consecutive positive integers. For example, 30 = (x*(x+1)-y*(y+1))/2 when (a) x=11, y=8: 9+10+11; (b) x=9, y=5: 6+7+8+9; and (c) x=8, y=3: 4+5+6+7+8. By definition, x-y is the number of integers in the string. (End)
- Paul Halmos, "Problems for Mathematicians, Young and Old", Dolciani Mathematical Expositions, 1991, Solution to problem 3G p. 179.
-
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; f:= proc(n) if (not isprime(n)) and (not ispoweroftwo(n)) then return n end if; end proc; seq(f(i),i = 1..150);
-
max=6!;lst={};Do[z=n+(n+1);Do[z+=(n+x);If[z>max,Break[]];AppendTo[lst,z],{x,2,max}],{n,max}];Union[lst] (* Vladimir Joseph Stephan Orlovsky, Mar 06 2010 *)
-
isok(n) = !(n == 1) && !isprime(n) && !(isprimepower(n, &p) && (p == 2)); \\ Michel Marcus, Jul 02 2019
-
from sympy import primepi
def A111774(n):
def f(x): return int(n+(0 if x<=1 else primepi(x)-1)+x.bit_length())
m, k = n, f(n)
while m != k: m, k = k, f(k)
return m # Chai Wah Wu, Sep 19 2024
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
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)
-
Table[Count[Range[3, n - 1, 2], ?(GCD[n, #] > 1 &)], {n, 100}] (* _T. D. Noe, Nov 30 2012 *)
a[1] = 0; a[n_] := Floor[n/2] - EulerPhi[2*n]/2; Array[a, 80] (* Amiram Eldar, Nov 28 2020 *)
-
a(n) = sum(i=2, n-1, (i%2) && (gcd(i,n)!=1)); \\ Michel Marcus, Aug 07 2018
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
For a(6) = 2 for A111774(6) = 15 see the example given in A337940.
Similarly for a(24) = 3 for A111774(24) = 42.
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
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.
Cf.
A001622,
A055034,
A014176,
A049310,
A019434,
A111774,
A121601,
A179260,
A187360,
A219839,
A338429,
A337940,
A338431.
Showing 1-4 of 4 results.
Comments