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

A225399 Number of nontrivial triangular numbers dividing triangular(n).

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 1, 0, 2, 2, 0, 2, 2, 0, 3, 4, 0, 1, 1, 1, 6, 2, 0, 2, 4, 0, 1, 3, 0, 2, 2, 0, 3, 1, 0, 8, 2, 0, 1, 5, 1, 2, 2, 0, 7, 3, 0, 2, 4, 0, 2, 3, 0, 1, 4, 3, 4, 1, 0, 4, 4, 0, 2, 5, 1, 3, 1, 0, 2, 4, 0, 3, 3, 0, 2, 5, 0, 4, 1, 1, 7, 1, 0, 3, 8, 0, 1
Offset: 0

Views

Author

Alex Ratushnyak, May 06 2013

Keywords

Comments

Number of triangular numbers t such that t divides triangular(n), and 1 < t < triangular(n).

Examples

			triangular(3) = 6 is divisible by triangular(2) = 3, so a(3) = 1.
triangular(8) = 36 is divisible by triangular(2) = 3 and triangular(3) = 6, so a(8) = 2.
		

Crossrefs

Programs

  • C
    #include 
    int main() {
      unsigned long long c, i, j, t, tn;
      for (i = tn = 0; i < (1ULL<<32); i++) {
            for (c=0, tn += i, t = j = 3; t*2 <= tn; t+=j, ++j)
                    if (tn % t == 0)  ++c;
            printf("%llu, ", c);
      }
      return 0;
    }
  • Maple
    A225399 := proc(n)
        option remember ;
        local a,tn,i;
        a := 0 ;
        tn := A000217(n) ;
        for i from 2 to n-1 do
            if modp(tn,A000217(i))=0 then
                a := a+1 ;
            end if;
        end do:
        a;
    end proc:
    seq(A225399(n),n=0..80) ; # R. J. Mathar, Jan 12 2024
  • Mathematica
    tri = Table[n (n + 1)/2, {n, 100}]; Table[cnt = 0; Do[If[Mod[tri[[n]], tri[[k]]] == 0, cnt++], {k, 2, n - 1}]; cnt, {n, 0, Length[tri]}] (* T. D. Noe, May 07 2013 *)

Formula

a(n) = A076982(n) - 2 for n > 1.

A368855 Index of the first occurrence of n in A076982.

Original entry on oeis.org

1, 2, 3, 8, 14, 15, 39, 20, 44, 35, 195, 119, 104, 594, 224, 384, 455, 539, 440, 560, 3080, 2184, 1539, 2015, 2639, 5264, 4199, 15399, 13299, 8855, 23919, 2079, 30744, 43680, 36575, 14399, 5984, 58695, 113399, 47124, 107184, 12375, 78624, 98175, 73359, 111320, 242879, 185724
Offset: 1

Views

Author

Robert G. Wilson v, Jan 09 2024

Keywords

Examples

			a(1) = 1 since A076982(1) = 1;
a(2) = 2 since A076982(2) = 2;
a(3) = 3 since A076982(3) = 3;
a(4) = 8 since A076982(8) = 4;
a(5) = 14 since A076982(14) = 5; etc.
		

Crossrefs

Essentially the same as A225400.

Programs

  • Mathematica
    k = 1; t[] := 0; f[n] := Length@ Select[ Divisors[n (n +1)/2], IntegerQ@ Sqrt[8# +1] &]; While[k < 250000, a = f@k; If[ t[a] == 0, t[a] = k]; k++]; t /@ Range@ 48

Formula

a(n) = (sqrt(8*A076983(n)+1)-1)/2. - Amiram Eldar, Jan 10 2024
Showing 1-2 of 2 results.