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.

A076167 Primes p such that sum of even digits of p equals sum of odd digits of p.

Original entry on oeis.org

211, 431, 853, 1021, 1087, 1201, 1223, 1289, 1447, 1627, 2011, 2213, 2617, 2671, 2819, 2837, 3041, 3221, 3467, 4013, 4637, 4673, 4691, 5443, 5623, 5689, 5869, 6217, 6271, 6473, 6491, 7283, 7621, 7643, 7687, 7823, 7867, 8017, 8053, 8219, 8237, 8273
Offset: 1

Views

Author

Zak Seidov, Nov 01 2002

Keywords

Comments

Primes in A036301.

Examples

			2671 is OK because 2+6=7+1.
		

Crossrefs

Intersection of A000040 and A036301,
Cf. A111309.

Programs

  • Maple
    f:= proc(n) local Lo,Le;
      Lo,Le:= selectremove(type,convert(n,base,10),odd);
      abs(convert(Lo,`+`)-convert(Le,`+`))
    end proc:
    select(t -> f(t) = 0, [seq(ithprime(i),i=1..10000)]); # Robert Israel, Nov 13 2024
  • Mathematica
    soeQ[n_]:=2*Total[Select[(x=IntegerDigits[n]),OddQ[#]&]]==Total[x]; Select[Prime[Range[1050]],soeQ[#]&] (* Jayanta Basu, May 23 2013 *)
    Cases[{Total@# &/@GatherBy[IntegerDigits@#,OddQ], #}&/@
    Prime@Range@3000, {{x_, x_}, y_} :> y] (* Hans Rudolf Widmer, Jul 26 2024 *)

A114442 Least prime whose absolute difference between the sum of its even decimal digits and the sum of its odd decimal digits is n.

Original entry on oeis.org

211, 23, 2, 3, 13, 5, 127, 7, 17, 281, 19, 137, 277, 139, 59, 881, 79, 179, 11299, 199, 1559, 2797, 1399, 599, 12799, 997, 1979, 86861, 1999, 13799, 25999, 13999, 49999, 172999, 70999, 19979, 1199929, 39799, 137999, 277999, 139999, 59999, 1299979
Offset: 0

Views

Author

Zak Seidov and Robert G. Wilson v, Feb 04 2006

Keywords

Comments

When a(n) is not A067180(n) and n!=0 (mod 3): 1, 11, 13, 17, 20, 22, 26, 29, 31, 32, 34, 35, 37, 38, 40, 44, 47, 49, 53, 55, 56, 58, 59, 61, 62, 65, 67, 70, 71, 73, 74, 76, 77, 80, 82, 83, ....

Examples

			a(0)=211 since 211 is the least prime which meets the criterion; i.e., |2 - (1+1)| = 0.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{id = IntegerDigits@Prime@n}, Abs[(Plus @@ id) - 2Plus @@ Select[id, OddQ]]]; t = Table[0, {50}]; Do[ a = f[n]; If[ t[[a + 1]] == 0, t[[a + 1]] = n], {n, 100020}]; t
Showing 1-2 of 2 results.