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

A271471 Values k > 1 in A271328 such that k does not have any nontrivial divisors in A271328.

Original entry on oeis.org

5, 17, 28, 37, 82, 106, 122, 197, 228, 257, 294, 362, 406, 577, 628, 677, 842, 906, 1161, 1228, 1297, 1376, 1522, 1606, 1682, 1937, 2028, 2117, 2402, 2513, 2606, 2917, 3028, 3142, 3482, 3606, 3722, 4236, 4357, 4629, 4762, 4906, 5042, 5483, 5777, 6242, 6406
Offset: 1

Views

Author

Peter Kagey, Apr 08 2016

Keywords

Comments

If k is in this sequence, then all multiples of k are in A271468.

Examples

			A271328(1) = 1 is not in this sequence because A271328(1) is not greater than 1.
A271328(2) = 5 is in this sequence because 5 does not have any nontrivial divisors.
A271328(3) = 10 is not in this sequence because A271328(2) is a proper divisor of A271328(3).
A271328(4) = 17 is in this sequence because 17 does not have any nontrivial divisors.
A271328(5) = 28 is in this sequence because 2, 4, 7, and 14 are not in A271328.
		

Programs

  • Mathematica
    nn = 240; s = {1}; Do[AppendTo[s, Total@ Select[Range[n - 1], Divisible[n, s[[#]]] &]], {n, 2, nn}]; t = Table[s[[3 n]]/3, {n, nn/3}];
    Select[Rest@ t, NoneTrue[Most@ Rest@ Divisors@ #, MemberQ[t, #] &] &] (* Michael De Vlieger, Apr 08 2016 *)

A269347 With a(1) = 1, a(n) is the sum of all 0 < m < n for which a(m) divides n.

Original entry on oeis.org

1, 1, 3, 3, 3, 15, 3, 3, 30, 3, 3, 51, 3, 3, 84, 3, 3, 111, 3, 3, 150, 3, 3, 195, 3, 3, 246, 3, 3, 318, 3, 3, 366, 3, 3, 435, 3, 3, 510, 3, 3, 591, 3, 3, 684, 3, 3, 771, 3, 3, 882, 3, 3, 975, 3, 3, 1086, 3, 3, 1218, 3, 3, 1326, 3, 3, 1455
Offset: 1

Views

Author

Alec Jones, Feb 24 2016

Keywords

Comments

For n > 2, I can prove that a(n) = 3 if 3 does not divide n, and in general, 3 divides a(n).
The base case is a(3) = 3. Suppose that the results hold for a(n) over 3 < n < k; we will show that the results hold for a(k) also. In the case that 3 does not divide k, then a(k) = 3, since a(1) and a(2) divide k but no other previous term can. This proves the first claim.
Otherwise, if 3 does divide k, then a(m) divides k for each 0 < m < k not divisible by 3; these numbers can be divided into k/3 pairs so that the sum of each pair is congruent to 0 modulo 3 (for instance, 1 + 2 == 4 + 5 == 7 + 8 == ... == 0 (mod 3)). If a(m) divides k for some 0 < m < k divisible by 3, this m does not change the congruence class of the sum that forms a(k). Thus, a(k) == 0 (mod 3) as required to prove the second claim.

Examples

			a(1) = 1;
a(2) = 1 because a(1) divides 2;
a(3) = 3 because a(1) and a(2) divide 3: 1+2=3;
a(4) = 3 because a(1) and a(2) divide 4: 1+2=3;
a(5) = 3 because a(1) and a(2) divide 5: 1+2=3;
a(6) = 15 because a(1), a(2), a(3), a(4), and a(5) divide 6: 1+2+3+4+5=15.
		

Crossrefs

Cf. A088167 which gives the number of m < n for which a(m) divides n.

Programs

  • Haskell
    a269347 1 = 1
    a269347 n = genericIndex a269347_list (n - 1)
    a269347_list = map a [1..] where
      a n = sum $ filter ((==) 0 . mod n . a269347) [1..n-1]
    -- Peter Kagey, Jun 17 2016
    
  • Java
    int[] terms = new int[1000];
    terms[0] = 1;
    for (int i = 1; i < 1000; i++) {
         int count = 0;
         for (int j = 0; j < i; j++) {
              if ((i + 1) % terms[j] == 0) {
                   count = count + (j + 1);
              }
         }
         terms[i] = count;
    }
    
  • Mathematica
    a = {1}; Do[AppendTo[a, Total@ Select[Range[n - 1], Divisible[n, a[[#]]] &]], {n, 2, 66}]; a (* Michael De Vlieger, Mar 24 2016 *)
  • PARI
    lista(nn) = {va = vector(nn); va[1] = 1; for (n=2, nn, va[n] = sum(k=1, n-1, k*((n % va[k])==0));); va;} \\ Michel Marcus, Feb 24 2016
    
  • Python
    from itertools import count, islice
    from sympy import divisors
    def A269347_gen(): # generator of terms
        A268347_dict = {1:1}
        yield 1
        for n in count(2):
            yield (s:=sum(A268347_dict.get(d,0) for d in divisors(n,generator=True)))
            A268347_dict[s] = A268347_dict.get(s,0) + n
    A269347_list = list(islice(A269347_gen(),40)) # Chai Wah Wu, Nov 17 2022
  • Ruby
    def a(n)
      seq = [1]
      (2..Float::INFINITY).each do |i|
        return seq.last[0...n].last if seq.length > n
        indices = seq.each_index.select { |j| i % seq[j] == 0 }
        seq << indices.map(&:next).reduce(:+)
      end
    end # Peter Kagey, Feb 25 2016
    

A271326 a(n) = A269347(3n).

Original entry on oeis.org

3, 15, 30, 51, 84, 111, 150, 195, 246, 318, 366, 435, 510, 591, 684, 771, 882, 975, 1086, 1218, 1326, 1455, 1590, 1731, 1884, 2031, 2190, 2370, 2526, 2718, 2886, 3075, 3270, 3483, 3684, 3891, 4128, 4335, 4566, 4818, 5046, 5295, 5550, 5811, 6084
Offset: 1

Views

Author

Alec Jones, Apr 04 2016

Keywords

Comments

This sequence represents the "peaks" of A269347(n), which occur for that sequence when n is divisible by 3.
Terms of this sequence are equal to 3n^2 + 3 with predictable frequency; see my comment on A271328.

Crossrefs

A271468 List of indices i such that A269347(3*i) != 3*(i^2 + 1).

Original entry on oeis.org

1, 5, 10, 15, 17, 20, 25, 28, 30, 34, 35, 37, 40, 45, 50, 51, 55, 56, 60, 65, 68, 70, 74, 75, 80, 82, 84, 85, 90, 95, 100, 102, 105, 106, 110, 111, 112, 115, 119, 120, 122, 125, 130, 135, 136, 140, 145, 148, 150, 153, 155, 160, 164, 165, 168, 170, 175, 180
Offset: 1

Views

Author

Peter Kagey, Apr 08 2016

Keywords

Comments

Equivalently, this sequences is a list of indices i such that A271328(i) != i^2 + 1.
If k is in A271328, then k is in this sequence.
All multiples of a(k) are in the sequence for k > 1.

Examples

			A269347(3*1) = 3 != 3*(1^2 + 1) = 6 so 1 is in the sequence.
A269347(3*2) = 15 = 3*(2^2 + 1) so 2 is not in the sequence.
A269347(3*3) = 30 = 3*(3^2 + 1) so 3 is not in the sequence.
A269347(3*4) = 51 = 3*(4^2 + 1) so 4 is not in the sequence.
A269347(3*5) = 84 != 3*(5^2 + 1) = 78 so 5 is in the sequence.
		
Showing 1-4 of 4 results.