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.

A076077 Group the natural numbers so that the n-th group contains n numbers, the k-th number in a group is a multiple of k and the sum of the group is prime: (2), (1, 4), (3, 8, 6), (5, 10, 12, 16), (7, 14, 9, 24, 25), ...

This page as a plain text file.
%I A076077 #6 Jul 08 2025 05:25:48
%S A076077 2,1,4,3,8,6,5,10,12,16,7,14,9,24,25,11,18,15,20,45,30,13,22,21,28,35,
%T A076077 36,42,17,26,27,32,40,48,49,72,19,34,33,44,50,54,56,80,63,23,38,39,52,
%U A076077 55,60,70,64,90,110,29,46,51,68,65,66,77,88,81,120,132,31,58,57,76,75
%N A076077 Group the natural numbers so that the n-th group contains n numbers, the k-th number in a group is a multiple of k and the sum of the group is prime: (2), (1, 4), (3, 8, 6), (5, 10, 12, 16), (7, 14, 9, 24, 25), ...
%C A076077 For 1 <= k <= n-2, T(n, k) is the smallest multiple of k not already used. T(n, n-1) must be chosen so that T(n, 1)+...+T(n, n-1) is relatively prime to n. - _David Wasserman_, Mar 24 2005
%e A076077   2,
%e A076077   1,  4,
%e A076077   3,  8,  6,
%e A076077   5, 10, 12, 16,
%e A076077   7, 14,  9, 24, 25,
%e A076077  11, 18, 15, 20, 45, 30,
%e A076077  13, 22, 21, 28, 35, 36, 42,
%e A076077  17, 26, 27, 32, 40, 48, 49, 72,
%e A076077  19, 34, 33, 44, 50, 54, 56, 80, 63,
%e A076077  23, 38, 39, 52, 55, 60, 70, 64, 90,110,
%e A076077  29, 46, 51, 68, 65, 66, 77, 88, 81,120,132,
%p A076077 A076077 := proc(n,k)
%p A076077     option remember ;
%p A076077     local a,prev,nprev,kprev,psum;
%p A076077     for a from k by k do
%p A076077         prev := false ;
%p A076077         for nprev from 1 to n-1 do
%p A076077             for kprev from 1 to nprev do
%p A076077                 if procname(nprev,kprev) = a then
%p A076077                     prev := true ;
%p A076077                 end if;
%p A076077             end do:
%p A076077         end do:
%p A076077         psum :=0 ;
%p A076077         for kprev from 1 to k-1 do
%p A076077             psum := psum+procname(n,kprev) ;
%p A076077             if procname(n,kprev) = a then
%p A076077                 prev := true ;
%p A076077             end if;
%p A076077         end do:
%p A076077         if not prev then
%p A076077             if k = n-1 then
%p A076077                 if igcd(a + psum,n) = 1 then
%p A076077                     return a;
%p A076077                 end if;
%p A076077             elif k = n then
%p A076077                 if isprime(a + psum) then
%p A076077                     return a;
%p A076077                 end if;
%p A076077             else
%p A076077                 return a;
%p A076077             end if;
%p A076077         end if;
%p A076077     end do:
%p A076077 end proc: # _R. J. Mathar_, Jul 08 2025
%Y A076077 Cf. A076074 (first column), A076075 (diagonal), A076076 (row sums).
%K A076077 nonn,tabl
%O A076077 1,1
%A A076077 _Amarnath Murthy_, Oct 05 2002
%E A076077 More terms from _David Wasserman_, Mar 24 2005