The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A340260 T(n, k) = Sum_{j=1..k} [n mod j <> 1], where [] is the Iverson bracket. Table read by rows. 2

%I #11 Jul 08 2023 20:15:33

%S 1,1,2,1,1,2,1,2,2,3,1,1,2,2,3,1,2,3,4,4,5,1,1,1,2,3,3,4,1,2,3,4,5,6,

%T 6,7,1,1,2,2,3,4,5,5,6,1,2,2,3,4,5,6,7,7,8,1,1,2,3,3,4,5,6,7,7,8,1,2,

%U 3,4,5,6,7,8,9,10,10,11,1,1,1,1,2,2,3,4,5,6,7,7,8

%N T(n, k) = Sum_{j=1..k} [n mod j <> 1], where [] is the Iverson bracket. Table read by rows.

%e Table starts:

%e [1] 1;

%e [2] 1, 2;

%e [3] 1, 1, 2;

%e [4] 1, 2, 2, 3;

%e [5] 1, 1, 2, 2, 3;

%e [6] 1, 2, 3, 4, 4, 5;

%e [7] 1, 1, 1, 2, 3, 3, 4;

%e [8] 1, 2, 3, 4, 5, 6, 6, 7;

%e [9] 1, 1, 2, 2, 3, 4, 5, 5, 6;

%e [10] 1, 2, 2, 3, 4, 5, 6, 7, 7, 8.

%p IversonBrackets := expr -> subs(true=1, false=0, evalb(expr)):

%p T := (n, k) -> add(IversonBrackets(irem(n, j) <> 1), j = 1..k):

%p for n from 1 to 19 do seq(T(n, k), k = 1..n) od;

%Y T(n, n) = n + 1 - tau(n-1) for n >= 2.

%Y Cf. A000005, A051731, A243987, A340261.

%K nonn,tabl

%O 1,3

%A _Peter Luschny_, Jan 02 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 21 08:46 EDT 2024. Contains 373543 sequences. (Running on oeis4.)