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-10 of 15 results. Next

A124176 Consider the map f that sends m to m + (sum of odd digits of m) - (sum of even digits of m). Sequence gives numbers m such that f^(k)(m) = m for some k.

Original entry on oeis.org

0, 11, 13, 17, 18, 25, 28, 54, 55, 64, 65, 112, 121, 134, 137, 143, 148, 155, 156, 165, 166, 173, 178, 184, 187, 198, 200, 209, 211, 216, 231, 233, 234, 237, 244, 245, 270, 275, 280, 285, 314, 336, 341, 358, 363, 385, 396, 402, 407, 410, 413, 429, 431, 432
Offset: 1

Views

Author

Eric Angelini, Dec 04 2006

Keywords

Comments

Terms computed by Barry and Theunis de Jong.
Subsequence A036301 lists fixed points of the map f = A304439. - M. F. Hasler, May 18 2018

Examples

			11 and 13 loop on themselves, but 12 doesn't:
11 -> 13 -> 17 -> 25 -> 28 -> 18 -> 11
12 -> 11 -> 13 -> 17 -> 25 -> 28 -> 18 -> 11
13 -> 17 -> 25 -> 28 -> 18 -> 11 -> 13.
		

Crossrefs

Programs

  • PARI
    is(n,S=List())=until(setsearch(Set(S),n=A304439(n)),listput(S,n));n==S[1] \\ M. F. Hasler, May 18 2018

A126908 Numbers k such that 1 + k^2 + k^4 + k^6 + k^7 is prime.

Original entry on oeis.org

1, 4, 13, 15, 24, 30, 37, 40, 55, 93, 138, 139, 148, 153, 154, 159, 160, 165, 184, 195, 204, 223, 258, 303, 355, 360, 373, 459, 472, 475, 510, 519, 534, 577, 594, 607, 615, 627, 658, 672, 688, 723, 735, 739, 795, 805, 807, 817, 819, 820, 847, 874, 879, 904
Offset: 1

Views

Author

Artur Jasinski, Dec 31 2006

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[1 + n^2 + n^4 + n^6 + n^7], AppendTo[a, n]], {n, 1, 1400}]; a
    Select[Range[1000],PrimeQ[1+#^2+#^4+#^6+#^7]&] (* Harvey P. Dale, Jan 15 2016 *)
  • PARI
    is(n)=isprime(1+n^2+n^4+n^6+n^7) \\ Charles R Greathouse IV, Feb 17 2017

A126916 Numbers n such that 1 + n^2 + n^4 + n^6 + n^8 + n^10 + n^12 + n^14 + n^16 + n^18 + n^20 + n^22 + n^23 is prime.

Original entry on oeis.org

1, 2, 11, 23, 47, 64, 77, 80, 103, 251, 290, 321, 331, 335, 375, 382, 387, 403, 507, 568, 590, 594, 649, 801, 805, 828, 830, 840, 847, 854, 905, 925, 926, 959, 982, 986, 1034, 1086, 1094, 1102, 1122, 1129, 1147, 1160, 1391
Offset: 1

Views

Author

Artur Jasinski, Dec 31 2006

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[1 + n^2 + n^4 + n^6 + n^8 + n^10 + n^12 + n^14 + n^16 + n^18 + n^20 + n^22 + n^23], AppendTo[a, n]], {n, 1, 1400}]; a
    Select[Range[1400],PrimeQ[Total[#^Range[2,22,2]]+1+#^23]&] (* Harvey P. Dale, Oct 04 2018 *)
  • PARI
    is(n)=isprime(1+n^2+n^4+n^6+n^8+n^10+n^12+n^14+n^16+n^18+n^20+n^22+n^23) \\ Charles R Greathouse IV, Feb 17 2017

A304439 Add to n the sum of its odd digits minus the sum of its even digits.

Original entry on oeis.org

0, 2, 0, 6, 0, 10, 0, 14, 0, 18, 11, 13, 11, 17, 11, 21, 11, 25, 11, 29, 18, 20, 18, 24, 18, 28, 18, 32, 18, 36, 33, 35, 33, 39, 33, 43, 33, 47, 33, 51, 36, 38, 36, 42, 36, 46, 36, 50, 36, 54, 55, 57, 55, 61, 55, 65, 55, 69, 55, 73, 54, 56, 54, 60, 54, 64, 54, 68, 54, 72
Offset: 0

Views

Author

M. F. Hasler, May 18 2018

Keywords

Comments

Subsequence A036301 lists fixed points of this map, the first nontrivial one being 112. It is a subsequence of A124176 (and A124177) which considers iterations of this map, more precisely, numbers which are in a cyclic orbit for iterations of this map.

Crossrefs

Programs

  • Mathematica
    soded[n_]:=Module[{idn=IntegerDigits[n]},n+Total[Select[idn,OddQ]]-Total[ Select[idn,EvenQ]]]; Array[soded,70,0] (* Harvey P. Dale, Aug 12 2021 *)
  • PARI
    A304439(n)=n-vecsum(apply(t->t*(-1)^t,digits(n)))

Formula

a(n) = n + A071650(n).

A304440 Add to n the sum of its even digits minus the sum of its odd digits.

Original entry on oeis.org

0, 0, 4, 0, 8, 0, 12, 0, 16, 0, 9, 9, 13, 9, 17, 9, 21, 9, 25, 9, 22, 22, 26, 22, 30, 22, 34, 22, 38, 22, 27, 27, 31, 27, 35, 27, 39, 27, 43, 27, 44, 44, 48, 44, 52, 44, 56, 44, 60, 44, 45, 45, 49, 45, 53, 45, 57, 45, 61, 45, 66, 66, 70, 66, 74, 66, 78, 66, 82, 66, 63
Offset: 0

Views

Author

M. F. Hasler, May 18 2018

Keywords

Comments

A036301 lists fixed points of this map, the first nonzero one being 112. It is also a subsequence of A124177 (and A124176) which lists numbers which are in a cyclic orbit under iterations of this map.

Crossrefs

Cf. A304439 (variant: + even - odd digits), A071650 (odd - even digits), A071648, A071649, A036301 (fixed points), A124177, A124176.

Programs

  • Mathematica
    nseo[n_]:=Module[{idn=IntegerDigits[n]},n+Total[Select[idn,EvenQ]]-Total[Select[idn,OddQ]]]; Array[nseo,80,0] (* Harvey P. Dale, Dec 26 2023 *)
  • PARI
    A304440(n)=n+vecsum(apply(t->t*(-1)^t,digits(n)))

Formula

a(n) = n - A071650(n).

A076164 Numbers n such that sum of squares of even digits of n equals sum of squares of odd digits of n.

Original entry on oeis.org

0, 11112, 11121, 11211, 11356, 11365, 11536, 11563, 11635, 11653, 12111, 13156, 13165, 13516, 13561, 13615, 13651, 15136, 15163, 15316, 15361, 15613, 15631, 16135, 16153, 16315, 16351, 16513, 16531, 21111, 31156, 31165, 31516, 31561
Offset: 1

Views

Author

Zak Seidov, Nov 01 2002

Keywords

Comments

The minimal number of digits in any nonzero term is 5.
Numbers such that the sum of even digits equals the sum of odd digits are listed in A036301.

Examples

			11356 is in the sequence because 1^2 + 1^2 + 3^2 + 5^2 = 6^2.
		

Crossrefs

Cf. A303269, A036301 (analog without squares), A071650, A304439, A304440, A124176, A124177.

Programs

  • Mathematica
    oeQ[n_]:=Module[{idn=IntegerDigits[n]},Total[Select[idn,OddQ]^2]== Total[ Select[ idn, EvenQ]^2]]; Select[Range[0,99999],oeQ] (* Harvey P. Dale, Sep 23 2011 *)
  • PARI
    is(n)=!vecsum(apply(d->d^2*(-1)^d,digits(n))) \\ M. F. Hasler, May 18 2018

Extensions

Edited and a(1) = 0 added by M. F. Hasler, May 18 2018

A126906 Smallest k such that 1 + k^(2*n+1) + Sum_{j=1..n} k^(2*j) is prime.

Original entry on oeis.org

1, 2, 1, 2, 1, 10, 17, 2, 1, 2, 1, 94, 122, 22, 1, 80, 1, 4, 6, 2, 1, 242, 3, 6, 5, 80, 1, 12, 1, 82, 96, 2, 7, 188, 1, 136, 69, 158, 1, 2, 1, 954, 50, 118, 1, 570, 14, 90, 45, 6, 1, 228, 38, 4, 6, 22, 1, 12, 1, 580, 86, 336, 24, 768, 1, 1170, 408, 340, 1, 896
Offset: 1

Views

Author

Artur Jasinski, Dec 31 2006

Keywords

Comments

1 is a term if and only if number of terms in polynomial is prime.

Crossrefs

Programs

  • Mathematica
    a[n_]: = Module[{k = 1}, While[!PrimeQ[1 + k^(2*n+1) + Sum[k^(2*j), {j, 1, n}]], k++]; k]; Array[a, 30] (* Amiram Eldar, Mar 13 2020 *)
  • PARI
    a(n) = my(k = 1); while(! isprime(1 + k^(2*n+1) + sum(j=1, n, k^(2*j))), k++); k; \\ Michel Marcus, Mar 13 2020

Extensions

More terms from Amiram Eldar, Mar 13 2020

A126907 Numbers n such that 1 + n^2 + n^4 + n^5 is prime.

Original entry on oeis.org

2, 4, 6, 8, 12, 18, 32, 34, 68, 70, 78, 88, 110, 114, 116, 118, 120, 122, 132, 134, 142, 150, 172, 180, 186, 190, 210, 216, 238, 246, 254, 272, 294, 322, 362, 376, 380, 386, 388, 408, 476, 500, 502, 506, 508, 520, 530, 542, 564, 584, 588, 590, 616, 620, 632
Offset: 1

Views

Author

Artur Jasinski, Dec 31 2006

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[1 + n^2 + n^4 + n^5], AppendTo[a, n]], {n, 1, 1400}]; a
    Select[Range[700],PrimeQ[1+#^2+#^4+#^5]&] (* Harvey P. Dale, Jun 24 2018 *)
  • PARI
    is(n)=isprime(1+n^2+n^4+n^5) \\ Charles R Greathouse IV, Jun 13 2017

A126909 Numbers n such that 1 + n^2 + n^4 + n^6 + n^8 + n^9 is prime.

Original entry on oeis.org

2, 18, 48, 56, 116, 120, 128, 146, 194, 198, 200, 230, 266, 278, 282, 288, 324, 362, 372, 390, 396, 420, 434, 458, 488, 576, 594, 708, 714, 728, 740, 774, 818, 830, 860, 888, 896, 912, 914, 990, 996, 1002, 1008, 1010, 1016, 1044, 1124, 1128, 1140, 1146, 1260
Offset: 1

Views

Author

Artur Jasinski, Dec 31 2006

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[1 + n^2 + n^4 + n^6 + n^8 + n^9], AppendTo[a, n]], {n, 1, 1400}]; a
    Select[Range[1300],PrimeQ[1+#^2+#^4+#^6+#^8+#^9]&] (* Harvey P. Dale, Apr 25 2020 *)
  • PARI
    is(n)=isprime(1+n^2+n^4+n^6+n^8+n^9) \\ Charles R Greathouse IV, Jun 13 2017

A126910 Numbers k such that 1 + k^2 + k^4 + k^6 + k^8 + k^10 + k^11 is prime.

Original entry on oeis.org

1, 2, 3, 35, 48, 77, 97, 105, 111, 112, 122, 128, 161, 168, 175, 216, 231, 255, 271, 276, 297, 338, 361, 370, 378, 422, 485, 513, 525, 558, 622, 658, 661, 662, 667, 675, 700, 718, 725, 742, 753, 766, 770, 795, 796, 833, 875, 886, 921, 993, 1027, 1066, 1078
Offset: 1

Views

Author

Artur Jasinski, Dec 31 2006

Keywords

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[PrimeQ[1 + n^2 + n^4 + n^6 + n^8 + n^10 + n^11], AppendTo[a, n]], {n, 1, 1400}]; a
  • PARI
    is(n)=isprime(1+n^2+n^4+n^6+n^8+n^10+n^11) \\ Charles R Greathouse IV, Jun 13 2017
Showing 1-10 of 15 results. Next