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-5 of 5 results.

A350836 Numbers k such that A103168(k) = A340592(k).

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 14, 50, 101, 131, 151, 181, 191, 194, 313, 353, 373, 383, 712, 727, 757, 762, 787, 797, 919, 929, 1100, 1994, 2701, 4959, 10301, 10501, 10601, 11311, 11411, 12421, 12721, 12821, 13331, 13831, 13931, 14341, 14741, 15451, 15551, 16061, 16361, 16561, 16661, 17471, 17971, 18181
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jan 17 2022

Keywords

Comments

Numbers k such that the concatenation of the prime factors of k with multiplicity is congruent mod k to the reverse of k.
Terms for which the common value of A103168(k) and A340592(k) is prime include 14, 50, 194, 1100, and 116416.

Examples

			a(7) = 14 is a term because A103168(14) = 41 mod 14 = 13 and A340592(14) = 27 mod 14 = 13.
		

Crossrefs

Programs

  • Maple
    revdigs:= proc(n) local L,i;
      L:= convert(n,base,10);
      add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    f:= proc(n) local L,p,i,r;
      L:= sort(map(t -> t[1]$t[2],ifactors(n)[2]));
      r:= L[1];
      for i from 2 to nops(L) do r:= r*10^(1+max(0,ilog10(L[i])))+L[i] od;
      r
    end proc:
    f(1):= 1:
    select(n -> (f(n) - revdigs(n)) mod n = 0, [$1..20000]);
  • Python
    from sympy import factorint
    def A103168(n):
        return int(str(n)[::-1])%n
    def A340592(n):
        if n == 1: return 0
        return int("".join(str(f) for f in factorint(n, multiple=True)))%n
    def ok(n):
        return A103168(n) == A340592(n)
    print([k for k in range(1, 20000) if ok(k)]) # Michael S. Branicky, Jan 18 2022

A071955 a(n) = remainder when n is reduced mod reverse(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 13, 14, 15, 16, 17, 18, 19, 0, 9, 0, 23, 24, 25, 26, 27, 28, 29, 0, 5, 9, 0, 34, 35, 36, 37, 38, 39, 0, 13, 18, 9, 0, 45, 46, 47, 48, 49, 0, 6, 2, 18, 9, 0, 56, 57, 58, 59, 0, 13, 10, 27, 18, 9, 0, 67, 68, 69, 0, 3, 18, 36, 27, 18, 9, 0, 78, 79, 0, 9
Offset: 1

Views

Author

Joseph L. Pe, Jun 16 2002

Keywords

Comments

a(n)=0 if n is palindromic - Labos Elemer, Jan 28 2005

Examples

			a(85) = 85 mod 58 = 27.
		

Crossrefs

Programs

  • Mathematica
    Table[Mod[n, FromDigits[Reverse[IntegerDigits[n]]]], {n, 1, 256}] (* Labos Elemer, Jan 28 2005 *)
    Table[Mod[n, FromDigits[Reverse[IntegerDigits[n]]]], {n, 1, 100}]
  • PARI
    a(n, base=10) = my (r=fromdigits(Vecrev(digits(n, base)), base)); n%r \\ Rémy Sigrist, Apr 05 2020

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jul 14 2007

A342122 a(n) is the remainder when the binary reverse of n is divided by n.

Original entry on oeis.org

0, 1, 0, 1, 0, 3, 0, 1, 0, 5, 2, 3, 11, 7, 0, 1, 0, 9, 6, 5, 0, 13, 6, 3, 19, 11, 0, 7, 23, 15, 0, 1, 0, 17, 14, 9, 4, 25, 18, 5, 37, 21, 10, 13, 0, 29, 14, 3, 35, 19, 0, 11, 43, 27, 4, 7, 39, 23, 55, 15, 47, 31, 0, 1, 0, 33, 30, 17, 12, 49, 42, 9, 0, 41, 30
Offset: 1

Views

Author

Rémy Sigrist, Feb 28 2021

Keywords

Comments

The binary reverse of a number is given by A030101.
This sequence is the analog of A103168 for the binary base.

Examples

			For n = 43,
- the binary reverse of 43 ("101011" in binary) is 53 ("110101" in binary),
- so a(43) = 53 mod 43 = 10.
		

Crossrefs

Programs

  • Mathematica
    Table[Mod[FromDigits[Reverse[IntegerDigits[n,2]],2],n],{n,80}] (* Harvey P. Dale, Mar 01 2023 *)
  • PARI
    a(n, base=2) = { my (r=fromdigits(Vecrev(digits(n, base)), base)); r%n }
    
  • Python
    def A342122(n): return int(bin(n)[:1:-1],2) % n if n > 0 else 0 # Chai Wah Wu, Mar 01 2021

Formula

a(n) = A030101(n) mod n.
a(n) < n.
a(n) = 0 iff n is a binary palindrome (A006995).

A072392 Numbers n such that reverse(n) = phi(n) (mod n).

Original entry on oeis.org

21, 27, 37, 63, 270, 291, 397, 1545, 1853, 2991, 6102, 15503, 27036, 48776, 198683, 200882, 274536, 1061361, 2348128, 2723436, 2746836, 3542805, 3564217, 3868867, 3962197, 4438616, 19844683, 46676013, 69460293, 198444683, 202195682, 297828396, 309520655
Offset: 1

Views

Author

Joseph L. Pe, Jul 21 2002

Keywords

Examples

			reverse(48776) = 67784 = 19008 (mod 48776) and 19008 = phi(48776), so 48776 is a term of the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^5], Mod[ FromDigits[Reverse[IntegerDigits[n]]], # ] == EulerPhi[ # ] &]
    Select[Range[45*10^5],Mod[IntegerReverse[#],#]==EulerPhi[#]&] (* The program generates the first 26 terms of the sequence. *) (* Harvey P. Dale, Feb 05 2025 *)

Extensions

More terms from Sean A. Irvine, Sep 28 2024

A350850 Members of A350836 that are not in A002385.

Original entry on oeis.org

1, 14, 50, 194, 712, 762, 1100, 1994, 2701, 4959, 58376, 70478, 111538, 116416, 144080, 158736, 712410, 1319216, 1934075, 7709760, 10228166, 11601194, 94663994, 177930006
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jan 18 2022

Keywords

Comments

Numbers k that are not palindromic primes, such that the concatenation of the prime factors of k with multiplicity is congruent mod k to the reverse of k.

Examples

			a(3) = 50 is a term because A103168(50) = 5 mod 50 = 5 and A340592(50) = 255 mod 50 = 5, but 50 is not a palindromic prime.
		

Crossrefs

Programs

  • Maple
    revdigs:= proc(n) local L, i;
      L:= convert(n, base, 10);
      add(L[-i]*10^(i-1), i=1..nops(L))
    end proc:
    f:= proc(n) local L, p, i, r;
      L:= sort(map(t -> t[1]$t[2], ifactors(n)[2]));
      r:= L[1];
      for i from 2 to nops(L) do r:= r*10^(1+max(0, ilog10(L[i])))+L[i] od;
      r
    end proc:
    f(1):= 1:
    filter:= proc(n) local r;
    r:= revdigs(n);
    (f(n) - r) mod n = 0 and (revdigs(n) <> n or not isprime(n))
    end proc:
    select(filter, [$1..10^6]);
Showing 1-5 of 5 results.