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.
%I A111774 #74 Sep 20 2024 02:06:37 %S A111774 6,9,10,12,14,15,18,20,21,22,24,25,26,27,28,30,33,34,35,36,38,39,40, %T A111774 42,44,45,46,48,49,50,51,52,54,55,56,57,58,60,62,63,65,66,68,69,70,72, %U A111774 74,75,76,77,78,80,81,82,84,85,86,87,88,90,91,92,93,94,95,96,98,99,100,102 %N A111774 Numbers that can be written as a sum of at least three consecutive positive integers. %C A111774 In this sequence there are no (odd) primes and there are no powers of 2. %C A111774 So we have only three kinds of natural numbers: the odd primes, the powers of 2 and the numbers that can be represented as a sum of at least three consecutive integers. %C A111774 Odd primes can only be written as a sum of two consecutive integers. Powers of 2 do not have a representation as a sum of k consecutive integers (other than the trivial n=n, for k=1). %C A111774 Numbers of the form (x*(x+1)-y*(y+1))/2 for nonnegative integers x,y with x-y >= 3. - _Bob Selcoe_, Feb 21 2014 %C A111774 Numbers of the form (x + 1)*(x + 2*y)/2 for integers x,y with x >= 2 and y >= 1. For y = 1 only triangular numbers (A000217) >= 6 occur. - _Ralf Steiner_, Jun 27 2019 %C A111774 From _Ralf Steiner_, Jul 09 2019: (Start) %C A111774 If k >= 1 sequences are c_k(n) = c_k(n - 1) + n + k - 1, c_k(0) = 0, means c_k(n) = n*(n + 2*k - 1)/2: A000217, A000096, A055998, A055999, A056000, ... then this sequence is the union of c_k(n), n >= 3. (End) %C A111774 From _Wolfdieter Lang_, Oct 28 2020: (Start) %C A111774 This sequence gives all positive integers that have at least one odd prime as proper divisor. The proof follows from the first two comments. %C A111774 The set {a(n)}_{n>=1} equals the set {k positive integer : floor(k/2) - delta(k) >= 1}, where delta(k) = A055034(k). Proof: floor(k/2) gives the number of positive odd numbers < k, and delta(k), gives the number of positive odd numbers coprime to k. delta(1) = 1 but 1 is not < 1, therefore k = 1 is not a member of this set. Hence a member >= 2 of this set has at least one odd number > 1 and < k missing in the set of odd numbers relative prime to k. Therefore there exists at least one odd prime < k dividing k. (End) %C A111774 For the multiplicity of a(n) see A338428, obtained from triangle A337940 (the array is given _Bob Selcoe_ as example below, and in the _Ralf Steiner_ comment above). - _Wolfdieter Lang_, Dec 09 2020 %D A111774 Paul Halmos, "Problems for Mathematicians, Young and Old", Dolciani Mathematical Expositions, 1991, Solution to problem 3G p. 179. %H A111774 Vincenzo Librandi, <a href="/A111774/b111774.txt">Table of n, a(n) for n = 1..1000</a> %H A111774 Nieuw Archief voor Wiskunde 5/6 nr. 2 Problems/UWC, <a href="http://www.nieuwarchief.nl/serie5/pdf/naw5-2005-06-2-181.pdf">Problem C</a>, Jun 2005, p. 181-182. %H A111774 Nieuw Archief voor Wiskunde 5/6 nr. 2 Problems/UWC, Problem C: <a href="http://www.jaapspies.nl/mathfiles/problem2005-2C.pdf">Solution of this Problem</a> %H A111774 J. Spies, <a href="http://www.jaapspies.nl/oeis/a111774.sage">Sage program for computing A111774</a> %e A111774 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. %e A111774 From _Bob Selcoe_, Feb 23 2014: (Start) %e A111774 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: %e A111774 6 10 15 21 28 36 45 55 66 %e A111774 9 14 20 27 35 44 54 65 %e A111774 12 18 25 33 42 52 63 %e A111774 15 22 30 39 49 60 %e A111774 18 26 35 45 56 %e A111774 21 30 40 51 %e A111774 24 34 45 %e A111774 27 38 %e A111774 30 %e A111774 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) %p A111774 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); %t A111774 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 *) %o A111774 (PARI) isok(n) = !(n == 1) && !isprime(n) && !(isprimepower(n, &p) && (p == 2)); \\ _Michel Marcus_, Jul 02 2019 %o A111774 (Python) %o A111774 from sympy import primepi %o A111774 def A111774(n): %o A111774 def f(x): return int(n+(0 if x<=1 else primepi(x)-1)+x.bit_length()) %o A111774 m, k = n, f(n) %o A111774 while m != k: m, k = k, f(k) %o A111774 return m # _Chai Wah Wu_, Sep 19 2024 %Y A111774 Cf. A000040, A000079, A066542, A174090 (complement), A000217, A049777, A055034. %Y A111774 Cf. A337940, A338428. %K A111774 easy,nonn %O A111774 1,1 %A A111774 _Jaap Spies_, Aug 15 2005