login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers k such that k and k+1 are both exponentially odd numbers (A268335).
3

%I #9 Nov 27 2023 09:41:49

%S 1,2,5,6,7,10,13,14,21,22,23,26,29,30,31,32,33,34,37,38,39,40,41,42,

%T 46,53,54,55,56,57,58,61,65,66,69,70,73,77,78,82,85,86,87,88,93,94,95,

%U 96,101,102,103,104,105,106,109,110,113,114,118,119,122,127,128

%N Numbers k such that k and k+1 are both exponentially odd numbers (A268335).

%C The numbers of terms not exceeding 10^k, for k = 1, 2, ..., are 6, 48, 478, 4734, 47195, 471707, 4716892, 47168363, 471681183, 4716806520, ... . Apparently, the asymptotic density of this sequence exists and equals Product_{p prime} (1 - 2/(p*(p+1))) = 0.47168... (A307868).

%H Amiram Eldar, <a href="/A367695/b367695.txt">Table of n, a(n) for n = 1..10000</a>

%t expOddQ[n_] := AllTrue[FactorInteger[n][[;; , 2]], OddQ]; Select[Range[128], And @@ expOddQ /@ {#, # + 1} &]

%o (PARI) isexpodd(n) = {my(f = factor(n)); for(i=1, #f~, if (!(f[i, 2] % 2), return (0))); 1;}

%o is(n) = isexpodd(n) && isexpodd(n+1)

%Y Subsequence of A268335.

%Y Cf. A307868.

%Y Subsequences: A007674, A325058.

%Y Similar sequences: A071318, A121495, A340152, A367696.

%K nonn

%O 1,2

%A _Amiram Eldar_, Nov 27 2023