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.

A190644 Least number k>1 such that (tau(k-1)+tau(k+1))/tau(k) = n where tau = A000005.

This page as a plain text file.
%I A190644 #28 Jul 25 2024 08:17:07
%S A190644 6,34,39,7,11,19,29,41,79,71,179,199,181,239,883,419,701,839,881,1429,
%T A190644 2351,1259,1871,2161,4049,3079,3361,2521,6481,4159,6299,5279,11551,
%U A190644 5039,20789,7561,25919,10079,16561,13441,38611,13859,23761,21839,100673,20161
%N A190644 Least number k>1 such that (tau(k-1)+tau(k+1))/tau(k) = n where tau = A000005.
%p A190644 with(numtheory):
%p A190644 a:= proc(n) local k;
%p A190644       for k from 2 while (tau(k-1)+tau(k+1)) /tau(k)<>n do od; k
%p A190644     end:
%p A190644 seq(a(n), n=1..50);  # _Alois P. Heinz_, May 19 2011
%t A190644 tau = DivisorSigma[0, #]&;
%t A190644 a[n_] := For[k=2, True, k++, If[(tau[k-1]+tau[k+1])/tau[k]==n, Return[k]]];
%t A190644 Array[a, 50] (* _Jean-François Alcover_, Mar 27 2017 *)
%t A190644 Module[{nn=300000,tau},tau=(#[[1]]+#[[3]])/#[[2]]&/@Partition[DivisorSigma[ 0,Range[nn]],3,1];Flatten[Table[Position[tau,n,1,1],{n,50}]]+1] (* _Harvey P. Dale_, Nov 24 2022 *)
%o A190644 (Sage)
%o A190644 def A190644(n):
%o A190644     tau = number_of_divisors
%o A190644     return next((k for k in IntegerRange(2,infinity) if tau(k-1)+tau(k+1) == n*tau(k))) # _D. S. McNeil_, May 19 2011
%Y A190644 Cf. A000005 (number of divisors of n), A190612.
%K A190644 nonn
%O A190644 1,1
%A A190644 _Juri-Stepan Gerasimov_, May 15 2011