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.

A381159 Numbers whose prime divisors all end in the same digit.

This page as a plain text file.
%I A381159 #37 Feb 21 2025 07:19:45
%S A381159 1,2,3,4,5,7,8,9,11,13,16,17,19,23,25,27,29,31,32,37,39,41,43,47,49,
%T A381159 53,59,61,64,67,69,71,73,79,81,83,89,97,101,103,107,109,113,117,119,
%U A381159 121,125,127,128,129,131,137,139,149,151,157,159,163,167,169,173,179
%N A381159 Numbers whose prime divisors all end in the same digit.
%C A381159 51st All-Russian Mathematical Olympiad for Schoolchildren. Problem. Let us call a natural number "lopsided" if it is greater than 1 and all its prime divisors end with the same digit. Is there an increasing arithmetic progression with a difference not exceeding 2025, consisting of 150 natural numbers, each of which is "lopsided"? (A. Chironov)
%C A381159 All powers of primes (A000961) are terms.
%e A381159 16, 69, 117 are included in the sequence because 16 = 2*2*2*2, 69 = 3*23, 117 = 3*3*13.
%p A381159 q:= n-> nops(map(p-> irem(p, 10), numtheory[factorset](n)))<2:
%p A381159 select(q, [$1..250])[];  # _Alois P. Heinz_, Feb 15 2025
%t A381159 q[n_] := SameQ @@ Mod[FactorInteger[n][[;; , 1]], 10]; Select[Range[2, 180], q] (* _Amiram Eldar_, Feb 16 2025 *)
%o A381159 (PARI) isok(k) = if (k==1, 1, my(f=factor(k)); #Set(vector(#f~, i, f[i, 1] % 10)) == 1); \\ _Michel Marcus_, Feb 16 2025
%o A381159 (Python)
%o A381159 from sympy import factorint, isprime
%o A381159 def ok(n): return n == 1 or isprime(n) or len(set(p%10 for p in factorint(n))) == 1
%o A381159 print([k for k in range(1, 180) if ok(k)]) # _Michael S. Branicky_, Feb 16 2025
%Y A381159 Union of A004618 (9), A004618 (3), A090652 (7), A004615 (1), A000351 (5), and A000079 (2).
%Y A381159 Union of A000961 and A380758.
%K A381159 nonn,base
%O A381159 1,2
%A A381159 _Alexander M. Domashenko_, Feb 15 2025