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

A379208 Numbers k such that prime(k) and prime(k) + 9 are anagrams.

Original entry on oeis.org

9, 19, 24, 26, 39, 48, 73, 77, 79, 91, 99, 110, 126, 143, 163, 188, 197, 200, 209, 212, 219, 224, 237, 241, 247, 252, 262, 269, 278, 279, 281, 285, 290, 291, 316, 336, 355, 360, 365, 391, 403, 405, 408, 431, 434, 439, 442, 448, 464, 468, 477, 486, 507, 517, 524, 531, 539, 544, 549, 550, 551, 575, 589, 602, 615
Offset: 1

Views

Author

Vincenzo Librandi, Dec 18 2024

Keywords

Examples

			9 is a term of the sequence because prime(9) = 23 and 23 + 9 = 32 are anagrams.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..2000] | Sort(Intseq(NthPrime(n))) eq Sort(Intseq(NthPrime(n) + 9))];
    
  • Maple
    filter:= proc(k) local p;
      p:= ithprime(k);
      sort(convert(p,base,10)) = sort(convert(p+9,base,10))
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Jan 18 2025
  • Mathematica
    Select[Range[3000],Sort[IntegerDigits[Prime[#]]]==Sort[IntegerDigits[Prime[#]+9]]&]
  • PARI
    is(n) = my(p = prime(n)); vecsort(digits(p)) == vecsort(digits(p+9)) \\ David A. Corneth, Dec 18 2024

Extensions

Name corrected by David A. Corneth, Dec 18 2024

A363820 Moving the rightmost digit of a number to place it furthest to the left adds 9 to the number.

Original entry on oeis.org

12, 23, 34, 45, 56, 67, 78, 89, 101, 212, 323, 434, 545, 656, 767, 878, 989, 1101, 2212, 3323, 4434, 5545, 6656, 7767, 8878, 9989, 11101, 22212, 33323, 44434, 55545, 66656, 77767, 88878, 99989, 111101, 222212, 333323, 444434, 555545, 666656, 777767, 888878, 999989
Offset: 1

Views

Author

Eric Angelini, Oct 18 2023

Keywords

Comments

All terms k are repdigit numbers minus 10. The sequence starts with 22 - 10 = 12. - Andrew Howroyd, Oct 22 2023

Examples

			a(1) = 12 plus 9 = 21; the rightmost 2 is now in front and 1 at the end;
a(2) = 23 plus 9 = 32; the rightmost 3 is now in front and 2 at the end;
a(3) = 34 plus 9 = 43; the rightmost 4 is now in front and 3 at the end;
a(4) = 45 plus 9 = 54; the rightmost 5 is now in front and 4 at the end;
...
a(9) = 101 plus 9 = 110; the rightmost 1 is now in front and 0 at the end; etc.
		

Crossrefs

Cf. A010785 (repdigit numbers), A228157, A363823.

Programs

  • Mathematica
    Select[Range[10^6],FromDigits[RotateRight[IntegerDigits[#]]]-#==9 &] (* Stefano Spezia, Oct 18 2023 *)
  • PARI
    a(n) = if(n > 0, (n%9 + 1)*(10^(n\9 + 2)-1)/9 - 10) \\ Andrew Howroyd, Oct 22 2023
  • Python
    def ok(n): s = str(n); return int(s[-1]+s[:-1]) - n == 9
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Oct 18 2023
    

A382118 Prime indices k such that prime(k) and prime(k) + 9 are anagrams.

Original entry on oeis.org

19, 73, 79, 163, 197, 241, 269, 281, 431, 439, 619, 647, 691, 739, 751, 761, 823, 877, 953, 1019, 1051, 1109, 1223, 1259, 1291, 1307, 1423, 1471, 1723, 1741, 1747, 1847, 1949, 1979, 2213, 2371, 2473, 2503, 2647, 2789, 2803, 2819, 2879, 2903, 2909, 3019, 3163, 3361
Offset: 1

Views

Author

Vincenzo Librandi, Apr 15 2025

Keywords

Comments

Primes in A379208.

Examples

			The prime 19 is a term of the sequence because prime(19)= 67 and 67 + 9 = 76 are anagrams.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..10000] | IsPrime(n) and Sort(Intseq(NthPrime(n))) eq Sort(Intseq(NthPrime(n) + 9))];
  • Mathematica
    Select[Prime[Range[500]],Sort[IntegerDigits[Prime[#]]]==Sort[IntegerDigits[Prime[#]+9]]&]

A266912 Numbers n which are anagrams of n+18.

Original entry on oeis.org

13, 24, 35, 46, 57, 68, 79, 102, 113, 124, 135, 146, 157, 168, 179, 202, 213, 224, 235, 246, 257, 268, 279, 302, 313, 324, 335, 346, 357, 368, 379, 402, 413, 424, 435, 446, 457, 468, 479, 502, 513, 524, 535, 546, 557, 568, 579, 602, 613, 624, 635, 646, 657
Offset: 1

Views

Author

Vincenzo Librandi, Jan 06 2016

Keywords

Comments

n is an anagram of n+k when k is a multiple of 9.

Examples

			24 is a term of the sequence because 24 and 24+18 = 42 are anagrams.
		

Crossrefs

Cf. A228157.

Programs

  • Magma
    [n: n in [0..700] | Sort(Intseq(n)) eq Sort(Intseq(n+18))]; // Bruno Berselli, Jan 08 2016
  • Mathematica
    Select[Range[0, 600], Sort[IntegerDigits[#]] == Sort[IntegerDigits[# + 18]] &] (* or *) Reap[Do[If[Sort@IntegerDigits[n] == Sort@IntegerDigits[n + 18], Sow[n]], {n, 600}]][[-1, 1]]
  • PARI
    isok(n) = vecsort(digits(n)) == vecsort(digits(n+18)); \\ Michel Marcus, Jan 08 2016
    

Formula

From Chai Wah Wu, Dec 23 2016: (Start)
a(n) = a(n-1) + a(n-8) - a(n-9) for n > 9.
G.f.: x*(-2*x^8 + 23*x^7 + 11*x^6 + 11*x^5 + 11*x^4 + 11*x^3 + 11*x^2 + 11*x + 13)/(x^9 - x^8 - x + 1).
First difference is 8-periodic: 11,11,11,11,11,11,23,11,... (End)
Showing 1-4 of 4 results.