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.

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

Original entry on oeis.org

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, 39, 50, 51, 53, 55, 57, 59, 61, 62, 63, 65, 66, 67, 69, 70, 71, 73, 75, 77, 79, 90, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 110, 111, 113, 115, 117
Offset: 1

Views

Author

Jonathan Kal-El Peréz, Mar 27 2019

Keywords

Comments

From Robert Israel, Apr 14 2020: (Start)
There are no digits 4 or 8.
If there is a digit 2 or 6, all previous digits must be even.
If there is a digit 0, all previous digits must be odd. (End)

Crossrefs

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

Programs

  • Maple
    filter:= proc(n) local L,i;
      L:= convert(n,base,10);
      if member(4,L) or member(8,L) then return false fi;
      if member(0,L,i) and hastype(L[i+1..-1],even) then return false fi;
      i:= ListTools:-SelectFirst(t -> t=2 or t=6, L,output=indices);
      i = NULL or not hastype(L[i+1..-1],odd);
    end proc:
    select(filter, [$1..300]); # Robert Israel, Apr 14 2020
  • Mathematica
    With[{k = 4}, Select[Range@ 120, NoneTrue[DeleteCases[FromDigits /@ Rest@ Subsequences[IntegerDigits@ #], 0], Mod[#, k] == 0 &] &]] (* Michael De Vlieger, Mar 31 2019 *)

Extensions

Corrected by Robert Israel, Apr 14 2020