The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A325113 Positive integers whose decimal representation has no nonzero subsequence that is divisible by 4. 3

%I #26 Apr 14 2020 19:58:32

%S 1,2,3,5,6,7,9,10,11,13,15,17,19,21,22,23,25,26,27,29,30,31,33,35,37,

%T 39,50,51,53,55,57,59,61,62,63,65,66,67,69,70,71,73,75,77,79,90,91,93,

%U 95,97,99,101,103,105,107,109,110,111,113,115,117

%N Positive integers whose decimal representation has no nonzero subsequence that is divisible by 4.

%C From _Robert Israel_, Apr 14 2020: (Start)

%C There are no digits 4 or 8.

%C If there is a digit 2 or 6, all previous digits must be even.

%C If there is a digit 0, all previous digits must be odd. (End)

%H Robert Israel, <a href="/A325113/b325113.txt">Table of n, a(n) for n = 1..10000</a>

%p filter:= proc(n) local L,i;

%p L:= convert(n,base,10);

%p if member(4,L) or member(8,L) then return false fi;

%p if member(0,L,i) and hastype(L[i+1..-1],even) then return false fi;

%p i:= ListTools:-SelectFirst(t -> t=2 or t=6, L,output=indices);

%p i = NULL or not hastype(L[i+1..-1],odd);

%p end proc:

%p select(filter, [$1..300]); # _Robert Israel_, Apr 14 2020

%t With[{k = 4}, Select[Range@ 120, NoneTrue[DeleteCases[FromDigits /@ Rest@ Subsequences[IntegerDigits@ #], 0], Mod[#, k] == 0 &] &]] (* _Michael De Vlieger_, Mar 31 2019 *)

%Y Cf. A014261 (for 2), A325112 (for 3), A261189 (for 5).

%K nonn,base

%O 1,2

%A _Jonathan Kal-El Peréz_, Mar 27 2019

%E Corrected by _Robert Israel_, Apr 14 2020

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 28 21:13 EDT 2024. Contains 372920 sequences. (Running on oeis4.)