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.

Showing 1-2 of 2 results.

A371222 Product of digits of (n written in base 3) mod 3.

Original entry on oeis.org

0, 1, 2, 0, 1, 2, 0, 2, 1, 0, 0, 0, 0, 1, 2, 0, 2, 1, 0, 0, 0, 0, 2, 1, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 2, 1, 0, 0, 0, 0, 2, 1, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 1, 2, 0, 0, 0, 0, 1, 2, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Ctibor O. Zizka, Mar 18 2024

Keywords

Comments

a(A032924(n)) = 1 or 2. For n >= 1, a(A032924(n)) - 1 = A309953(A032924(n)) mod 3 - 1 = A010059(n+1).

Examples

			n = 5: 5_10 = 12_3 thus a(5) = 1*2 mod 3 = 2.
n = 8: 8_10 = 22_3 thus a(8) = 2*2 mod 3 = 1.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Mod[Times @@ IntegerDigits[n, 3], 3]; Array[a, 100, 0] (* Amiram Eldar, Mar 18 2024 *)
  • Python
    from functools import reduce
    from sympy.ntheory import digits
    def A371222(n): return reduce(lambda a,b: a*b%3,digits(n,3)[1:],1) # Chai Wah Wu, Mar 19 2024

Formula

a(n) = A309953(n) mod 3.
a(A081605(n)) = 0.

A382402 Numbers divisible by the product of their digits (mod 10).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 24, 26, 34, 35, 37, 48, 55, 62, 64, 66, 72, 73, 75, 76, 78, 84, 88, 95, 96, 98, 99, 111, 112, 115, 126, 132, 134, 135, 136, 137, 144, 148, 155, 162, 164, 168, 172, 173, 175, 176, 184, 188, 192, 195, 196, 198, 199, 212, 216, 228, 232, 244, 248, 264, 266
Offset: 1

Views

Author

Enrique Navarrete, Mar 23 2025

Keywords

Comments

Unlike A007602 and A064700, where there are no other primes besides 2, 3, 5, 7 and primes with repunits, this sequence contains other primes such as 37, 73 and 137.
The sequence has asymptotic density 0, since it contains no numbers with digit 5 and an even digit. - Robert Israel, Jun 01 2025

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,t;
      L:= convert(n,base,10);
      t:= convert(L,`*`) mod 10;
      t > 0 and n mod t = 0
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Jun 01 2025
  • Mathematica
    Select[Range[300], (prod = Mod[Times @@ IntegerDigits[#], 10]) > 0 && Divisible[#, prod] &] (* Amiram Eldar, Mar 23 2025 *)
  • PARI
    isok(k) = my(p=lift(vecprod(apply(x->Mod(x, 10), digits(k))))); if (p, !(k % p)); \\ Michel Marcus, Mar 31 2025
  • Python
    from math import prod
    def ok(n): return (p:=prod(map(int, str(n)))%10) > 0 and n%p == 0
    print([k for k in range(300) if ok(k)]) # Michael S. Branicky, Mar 23 2025
    
Showing 1-2 of 2 results.